tests: update reference tests (#24899)
* tests: update reference tests * tests: fix flaw in state test execution * f
This commit is contained in:
parent
7bcbbbf836
commit
59e0f1ee00
|
@ -233,15 +233,14 @@ func (t *StateTest) RunNoVerify(subtest StateSubtest, vmconfig vm.Config, snapsh
|
||||||
if _, err := core.ApplyMessage(evm, msg, gaspool); err != nil {
|
if _, err := core.ApplyMessage(evm, msg, gaspool); err != nil {
|
||||||
statedb.RevertToSnapshot(snapshot)
|
statedb.RevertToSnapshot(snapshot)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Commit block
|
|
||||||
statedb.Commit(config.IsEIP158(block.Number()))
|
|
||||||
// Add 0-value mining reward. This only makes a difference in the cases
|
// Add 0-value mining reward. This only makes a difference in the cases
|
||||||
// where
|
// where
|
||||||
// - the coinbase suicided, or
|
// - the coinbase suicided, or
|
||||||
// - there are only 'bad' transactions, which aren't executed. In those cases,
|
// - there are only 'bad' transactions, which aren't executed. In those cases,
|
||||||
// the coinbase gets no txfee, so isn't created, and thus needs to be touched
|
// the coinbase gets no txfee, so isn't created, and thus needs to be touched
|
||||||
statedb.AddBalance(block.Coinbase(), new(big.Int))
|
statedb.AddBalance(block.Coinbase(), new(big.Int))
|
||||||
|
// Commit block
|
||||||
|
statedb.Commit(config.IsEIP158(block.Number()))
|
||||||
// And _now_ get the state root
|
// And _now_ get the state root
|
||||||
root := statedb.IntermediateRoot(config.IsEIP158(block.Number()))
|
root := statedb.IntermediateRoot(config.IsEIP158(block.Number()))
|
||||||
return snaps, statedb, root, nil
|
return snaps, statedb, root, nil
|
||||||
|
|
Loading…
Reference in New Issue