general state test: don't swallow asserts
This commit is contained in:
parent
74cc3b6127
commit
9d9aa738db
|
@ -110,7 +110,15 @@ proc testFixtureIndexes(ctx: var TestCtx, testStatusIMPL: var TestStatus) =
|
||||||
# during the next call to `getComittedStorage`
|
# during the next call to `getComittedStorage`
|
||||||
db.persist()
|
db.persist()
|
||||||
|
|
||||||
defer:
|
let rc = vmState.processTransaction(
|
||||||
|
ctx.tx, sender, ctx.header, fork)
|
||||||
|
if rc.isOk:
|
||||||
|
gasUsed = rc.value
|
||||||
|
|
||||||
|
let miner = ctx.header.coinbase
|
||||||
|
coinbaseStateClearing(vmState, miner, fork)
|
||||||
|
|
||||||
|
block post:
|
||||||
let obtainedHash = vmState.readOnlyStateDB.rootHash
|
let obtainedHash = vmState.readOnlyStateDB.rootHash
|
||||||
check obtainedHash == ctx.expectedHash
|
check obtainedHash == ctx.expectedHash
|
||||||
let logEntries = vmState.getAndClearLogEntries()
|
let logEntries = vmState.getAndClearLogEntries()
|
||||||
|
@ -120,14 +128,6 @@ proc testFixtureIndexes(ctx: var TestCtx, testStatusIMPL: var TestStatus) =
|
||||||
let success = ctx.expectedLogs == actualLogsHash and obtainedHash == ctx.expectedHash
|
let success = ctx.expectedLogs == actualLogsHash and obtainedHash == ctx.expectedHash
|
||||||
ctx.dumpDebugData(vmState, gasUsed, success)
|
ctx.dumpDebugData(vmState, gasUsed, success)
|
||||||
|
|
||||||
let rc = vmState.processTransaction(
|
|
||||||
ctx.tx, sender, ctx.header, fork)
|
|
||||||
if rc.isOk:
|
|
||||||
gasUsed = rc.value
|
|
||||||
|
|
||||||
let miner = ctx.header.coinbase
|
|
||||||
coinbaseStateClearing(vmState, miner, fork)
|
|
||||||
|
|
||||||
proc testFixture(fixtures: JsonNode, testStatusIMPL: var TestStatus,
|
proc testFixture(fixtures: JsonNode, testStatusIMPL: var TestStatus,
|
||||||
trace = false, debugMode = false) =
|
trace = false, debugMode = false) =
|
||||||
var ctx: TestCtx
|
var ctx: TestCtx
|
||||||
|
|
Loading…
Reference in New Issue