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:
|
else:
|
||||||
info "block validation success", validationResult, blockNumber
|
info "block validation success", validationResult, blockNumber
|
||||||
|
|
||||||
|
transaction.rollback()
|
||||||
dumpDebuggingMetaData(chainDB, header, body, vmState, false)
|
dumpDebuggingMetaData(chainDB, header, body, vmState, false)
|
||||||
let
|
let
|
||||||
fileName = "debug" & $blockNumber & ".json"
|
fileName = "debug" & $blockNumber & ".json"
|
||||||
|
|
|
@ -29,6 +29,7 @@ proc dumpDebug(chainDB: BaseChainDB, blockNumber: Uint256) =
|
||||||
captureChainDB.setHead(parent, true)
|
captureChainDB.setHead(parent, true)
|
||||||
let validationResult = processBlock(captureChainDB, parent, header, body, vmState)
|
let validationResult = processBlock(captureChainDB, parent, header, body, vmState)
|
||||||
|
|
||||||
|
transaction.rollback()
|
||||||
dumpDebuggingMetaData(captureChainDB, header, body, vmState, false)
|
dumpDebuggingMetaData(captureChainDB, header, body, vmState, false)
|
||||||
|
|
||||||
proc main() =
|
proc main() =
|
||||||
|
|
|
@ -75,6 +75,7 @@ proc huntProblematicBlock(blockNumber: Uint256): ValidationResult =
|
||||||
validationResult = processBlock(chainDB, parentBlock.header, thisBlock.header, thisBlock.body, vmState)
|
validationResult = processBlock(chainDB, parentBlock.header, thisBlock.header, thisBlock.body, vmState)
|
||||||
|
|
||||||
if validationResult != ValidationResult.OK:
|
if validationResult != ValidationResult.OK:
|
||||||
|
transaction.rollback()
|
||||||
dumpDebuggingMetaData(chainDB, thisBlock.header, thisBlock.body, vmState, false)
|
dumpDebuggingMetaData(chainDB, thisBlock.header, thisBlock.body, vmState, false)
|
||||||
|
|
||||||
result = validationResult
|
result = validationResult
|
||||||
|
|
Loading…
Reference in New Issue