general state test: don't swallow asserts

This commit is contained in:
Jacek Sieka 2024-05-29 11:26:27 +02:00
parent 74cc3b6127
commit 9d9aa738db
No known key found for this signature in database
GPG Key ID: A1B09461ABB656B8
1 changed files with 9 additions and 9 deletions

View File

@ -110,7 +110,15 @@ proc testFixtureIndexes(ctx: var TestCtx, testStatusIMPL: var TestStatus) =
# during the next call to `getComittedStorage`
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
check obtainedHash == ctx.expectedHash
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
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,
trace = false, debugMode = false) =
var ctx: TestCtx