reduce blockHash call (#2954)

This commit is contained in:
Advaita Saha 2024-12-19 01:13:12 +05:30 committed by GitHub
parent cd3cea0e29
commit 48aa410f8a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

3
.gitignore vendored
View File

@ -41,3 +41,6 @@ nimble.paths
# nimbus-build-system files
nimbus-build-system.paths
# vscode generated files for path mapping into vendor
.vscode

View File

@ -153,8 +153,9 @@ proc validateBlock(c: ForkedChainRef,
if updateCursor:
c.updateCursor(blk, move(res.value))
let blkHash = blk.header.blockHash
for i, tx in blk.transactions:
c.txRecords[rlpHash(tx)] = (blk.header.blockHash, uint64(i))
c.txRecords[rlpHash(tx)] = (blkHash, uint64(i))
ok()