Skip to content

Commit 48aa410

Browse files
authored
reduce blockHash call (#2954)
1 parent cd3cea0 commit 48aa410

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,6 @@ nimble.paths
4141

4242
# nimbus-build-system files
4343
nimbus-build-system.paths
44+
45+
# vscode generated files for path mapping into vendor
46+
.vscode

nimbus/core/chain/forked_chain.nim

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,9 @@ proc validateBlock(c: ForkedChainRef,
153153
if updateCursor:
154154
c.updateCursor(blk, move(res.value))
155155

156+
let blkHash = blk.header.blockHash
156157
for i, tx in blk.transactions:
157-
c.txRecords[rlpHash(tx)] = (blk.header.blockHash, uint64(i))
158+
c.txRecords[rlpHash(tx)] = (blkHash, uint64(i))
158159

159160
ok()
160161

0 commit comments

Comments
 (0)