use transaction.rollback in debug, hunter, and dumper
This commit is contained in:
parent
28245e92a2
commit
0e6f96b0e1
|
@ -30,6 +30,7 @@ proc executeBlock(blockEnv: JsonNode, memoryDB: TrieDatabaseRef, blockNumber: Ui
|
|||
else:
|
||||
info "block validation success", validationResult, blockNumber
|
||||
|
||||
transaction.rollback()
|
||||
dumpDebuggingMetaData(chainDB, header, body, vmState, false)
|
||||
let
|
||||
fileName = "debug" & $blockNumber & ".json"
|
||||
|
|
|
@ -29,6 +29,7 @@ proc dumpDebug(chainDB: BaseChainDB, blockNumber: Uint256) =
|
|||
captureChainDB.setHead(parent, true)
|
||||
let validationResult = processBlock(captureChainDB, parent, header, body, vmState)
|
||||
|
||||
transaction.rollback()
|
||||
dumpDebuggingMetaData(captureChainDB, header, body, vmState, false)
|
||||
|
||||
proc main() =
|
||||
|
|
|
@ -75,6 +75,7 @@ proc huntProblematicBlock(blockNumber: Uint256): ValidationResult =
|
|||
validationResult = processBlock(chainDB, parentBlock.header, thisBlock.header, thisBlock.body, vmState)
|
||||
|
||||
if validationResult != ValidationResult.OK:
|
||||
transaction.rollback()
|
||||
dumpDebuggingMetaData(chainDB, thisBlock.header, thisBlock.body, vmState, false)
|
||||
|
||||
result = validationResult
|
||||
|
|
Loading…
Reference in New Issue