fix: show correct blockNumber and log in end of era files (#2691)

This commit is contained in:
Advaita Saha 2024-10-04 07:07:50 +05:30 committed by GitHub
parent e3b0edd397
commit 3519b4a38c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 2 deletions

View File

@ -271,7 +271,7 @@ proc importBlocks*(conf: NimbusConf, com: CommonRef) =
proc loadEraBlock(blockNumber: uint64): bool =
# Separate proc to reduce stack usage of blk
let blk = db.getEthBlock(blockNumber).valueOr:
error "Could not load block from era1", blockNumber, error
error "Could not load block from era1", blockNumber, error=error
return false
blocks.add blk
@ -279,6 +279,7 @@ proc importBlocks*(conf: NimbusConf, com: CommonRef) =
while running and imported < conf.maxBlocks and blockNumber <= lastEra1Block:
if not loadEraBlock(blockNumber):
notice "No more era1 blocks to import", blockNumber
break
imported += 1
@ -291,7 +292,7 @@ proc importBlocks*(conf: NimbusConf, com: CommonRef) =
if blockNumber > lastEra1Block:
notice "Importing era archive",
start, dataDir = conf.dataDir.string, eraDir = conf.eraDir.string
blockNumber, dataDir = conf.dataDir.string, eraDir = conf.eraDir.string
let
eraDB = EraDB.new(clConfig.cfg, conf.eraDir.string, genesis_validators_root)