Skip to content

Commit a36719b

Browse files
holimanjagdeep sidhu
authored andcommitted
tests: update reference tests (ethereum#24899)
* tests: update reference tests * tests: fix flaw in state test execution * f
1 parent 8d14bf7 commit a36719b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tests/state_test_util.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,15 +233,14 @@ func (t *StateTest) RunNoVerify(subtest StateSubtest, vmconfig vm.Config, snapsh
233233
if _, err := core.ApplyMessage(evm, msg, gaspool); err != nil {
234234
statedb.RevertToSnapshot(snapshot)
235235
}
236-
237-
// Commit block
238-
statedb.Commit(config.IsEIP158(block.Number()))
239236
// Add 0-value mining reward. This only makes a difference in the cases
240237
// where
241238
// - the coinbase suicided, or
242239
// - there are only 'bad' transactions, which aren't executed. In those cases,
243240
// the coinbase gets no txfee, so isn't created, and thus needs to be touched
244241
statedb.AddBalance(block.Coinbase(), new(big.Int))
242+
// Commit block
243+
statedb.Commit(config.IsEIP158(block.Number()))
245244
// And _now_ get the state root
246245
root := statedb.IntermediateRoot(config.IsEIP158(block.Number()))
247246
return snaps, statedb, root, nil

0 commit comments

Comments
 (0)