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)
|
body = chainDB.getBlockBody(header.blockHash)
|
||||||
|
|
||||||
let
|
let
|
||||||
|
transaction = memoryDB.beginTransaction()
|
||||||
vmState = newBaseVMState(parent, chainDB)
|
vmState = newBaseVMState(parent, chainDB)
|
||||||
validationResult = processBlock(chainDB, parent, header, body, vmState)
|
validationResult = processBlock(chainDB, parent, header, body, vmState)
|
||||||
|
|
||||||
if validationResult != ValidationResult.OK:
|
if validationResult != ValidationResult.OK:
|
||||||
error "block validation error", validationResult
|
error "block validation error", validationResult
|
||||||
else:
|
else:
|
||||||
info "block validation success", validationResult, blockNumber
|
info "block validation success", validationResult, blockNumber
|
||||||
|
|
||||||
|
# success or not dispose it
|
||||||
|
transaction.dispose()
|
||||||
|
|
||||||
dumpDebuggingMetaData(chainDB, header, body, vmState, false)
|
dumpDebuggingMetaData(chainDB, header, body, vmState, false)
|
||||||
let
|
let
|
||||||
fileName = "debug" & $blockNumber & ".json"
|
fileName = "debug" & $blockNumber & ".json"
|
||||||
|
|
Loading…
Reference in New Issue