mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-20 11:46:44 +00:00
core/state: fix test by simulated opcode handler behavior
This commit is contained in:
parent
9dda9f02b2
commit
82c7afcb70
1 changed files with 2 additions and 0 deletions
|
|
@ -49,6 +49,8 @@ func TestBurn(t *testing.T) {
|
|||
createAndDestroy := func(addr common.Address) {
|
||||
hooked.AddBalance(addr, uint256.NewInt(100), tracing.BalanceChangeUnspecified)
|
||||
hooked.CreateContract(addr)
|
||||
// Simulate what the opcode handler does: clear balance before selfdestruct
|
||||
hooked.SubBalance(addr, hooked.GetBalance(addr), tracing.BalanceDecreaseSelfdestruct)
|
||||
hooked.SelfDestruct(addr)
|
||||
// sanity-check that balance is now 0
|
||||
if have, want := hooked.GetBalance(addr), new(uint256.Int); !have.Eq(want) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue