tests: fix test panic (#30741)

Fix panic in tests
pull/30439/head^2
rjl493456442 2 weeks ago committed by GitHub
parent 3f5f2efccb
commit 77f3ef3714
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      tests/state_test_util.go

@ -308,6 +308,7 @@ func (t *StateTest) RunNoVerify(subtest StateSubtest, vmconfig vm.Config, snapsh
if tracer := evm.Config.Tracer; tracer != nil && tracer.OnTxEnd != nil { if tracer := evm.Config.Tracer; tracer != nil && tracer.OnTxEnd != nil {
evm.Config.Tracer.OnTxEnd(nil, err) evm.Config.Tracer.OnTxEnd(nil, err)
} }
return st, common.Hash{}, 0, err
} }
// 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
@ -322,7 +323,7 @@ func (t *StateTest) RunNoVerify(subtest StateSubtest, vmconfig vm.Config, snapsh
receipt := &types.Receipt{GasUsed: vmRet.UsedGas} receipt := &types.Receipt{GasUsed: vmRet.UsedGas}
tracer.OnTxEnd(receipt, nil) tracer.OnTxEnd(receipt, nil)
} }
return st, root, vmRet.UsedGas, err return st, root, vmRet.UsedGas, nil
} }
func (t *StateTest) gasLimit(subtest StateSubtest) uint64 { func (t *StateTest) gasLimit(subtest StateSubtest) uint64 {

Loading…
Cancel
Save