premix: fix dumper tool, dispose db changes
This commit is contained in:
parent
987c561b0c
commit
fdc9a15785
|
@ -17,6 +17,7 @@ proc dumpDebug(chainDB: BaseChainDB, blockNumber: Uint256) =
|
|||
captureChainDB = newBaseChainDB(captureTrieDB, false)
|
||||
|
||||
let
|
||||
transaction = memoryDB.beginTransaction()
|
||||
parentNumber = blockNumber - 1
|
||||
parent = captureChainDB.getBlockHeader(parentNumber)
|
||||
header = captureChainDB.getBlockHeader(blockNumber)
|
||||
|
@ -26,6 +27,9 @@ proc dumpDebug(chainDB: BaseChainDB, blockNumber: Uint256) =
|
|||
|
||||
captureChainDB.setHead(parent, true)
|
||||
let validationResult = processBlock(captureChainDB, parent, header, body, vmState)
|
||||
|
||||
# success or not dispose it
|
||||
transaction.dispose()
|
||||
dumpDebuggingMetaData(captureChainDB, header, body, vmState, false)
|
||||
|
||||
proc main() =
|
||||
|
|
Loading…
Reference in New Issue