fix block import

This commit is contained in:
jangko 2023-08-06 10:42:28 +07:00
parent bdaeedb09f
commit 7ec298d49d
No known key found for this signature in database
GPG Key ID: 31702AE10541E6B9
2 changed files with 6 additions and 1 deletions

View File

@ -12,6 +12,7 @@
"muirGlacierBlock": 33,
"berlinBlock": 33,
"londonBlock": 33,
"mergeForkBlock": 33,
"terminalTotalDifficulty": 4357120,
"shanghaiTime": 1444660030
},

View File

@ -24,10 +24,14 @@ proc importRlpBlock*(blocksRlp: openArray[byte]; com: CommonRef; importFile: str
header: BlockHeader
body: BlockBody
# The following kludge is needed for the `LegacyDbPersistent` type database
# when `pruneTrie` is enabled. For other cases, this code is irrelevant.
com.db.compensateLegacySetup()
# even though the new imported blocks have block number
# smaller than head, we keep importing it.
# it maybe a side chain.
while rlp.hasData:
try:
rlp.decompose(header, body)