premix: fixes debug tool, dispose db changes
This commit is contained in:
parent
2f208c32e0
commit
601350d8d0
|
@ -20,14 +20,18 @@ proc executeBlock(blockEnv: JsonNode, memoryDB: TrieDatabaseRef, blockNumber: Ui
|
|||
body = chainDB.getBlockBody(header.blockHash)
|
||||
|
||||
let
|
||||
transaction = memoryDB.beginTransaction()
|
||||
vmState = newBaseVMState(parent, chainDB)
|
||||
validationResult = processBlock(chainDB, parent, header, body, vmState)
|
||||
|
||||
if validationResult != ValidationResult.OK:
|
||||
if validationResult != ValidationResult.OK:
|
||||
error "block validation error", validationResult
|
||||
else:
|
||||
info "block validation success", validationResult, blockNumber
|
||||
|
||||
# success or not dispose it
|
||||
transaction.dispose()
|
||||
|
||||
dumpDebuggingMetaData(chainDB, header, body, vmState, false)
|
||||
let
|
||||
fileName = "debug" & $blockNumber & ".json"
|
||||
|
|
Loading…
Reference in New Issue