diff --git a/eth/tracers/live/supply_fill_test.go b/eth/tracers/live/supply_fill_test.go index 56e5388355..edce37c75f 100644 --- a/eth/tracers/live/supply_fill_test.go +++ b/eth/tracers/live/supply_fill_test.go @@ -316,10 +316,15 @@ func TestSupplySelfdestruct(t *testing.T) { Hash: head.Hash(), ParentHash: head.ParentHash, }} + post = &types.GenesisAlloc{ + dad: {Balance: eth1}, + aa: {Balance: big.NewInt(0), Code: gspec.Alloc[aa].Code}, + bb: {Balance: big.NewInt(0)}, + } ) compareAsJSON(t, expected, preCancunOutput) - preCancunTest, err := btFromChain(preCancunDB, preCancunChain, nil) + preCancunTest, err := btFromChain(preCancunDB, preCancunChain, post) if err != nil { t.Fatalf("failed to fill tests from chain: %v", err) } @@ -373,9 +378,14 @@ func TestSupplySelfdestruct(t *testing.T) { Hash: head.Hash(), ParentHash: head.ParentHash, }} + post = &types.GenesisAlloc{ + dad: {Balance: eth1}, + aa: {Balance: big.NewInt(0), Code: gspec.Alloc[aa].Code}, + bb: {Balance: gwei5, Code: gspec.Alloc[bb].Code}, + } compareAsJSON(t, expected, postCancunOutput) - postCancunTest, err := btFromChain(postCancunDB, postCancunChain, nil) + postCancunTest, err := btFromChain(postCancunDB, postCancunChain, post) if err != nil { t.Fatalf("failed to fill tests from chain: %v", err) } diff --git a/eth/tracers/live/testdata/supply/selfdestruct.json b/eth/tracers/live/testdata/supply/selfdestruct.json index 717041be2d..ae3dff06c0 100644 --- a/eth/tracers/live/testdata/supply/selfdestruct.json +++ b/eth/tracers/live/testdata/supply/selfdestruct.json @@ -73,7 +73,19 @@ }, "lastblockhash": "d5a0d7e4b5fa687dd355938a24e34229db3c01cd2a999e5023369016371a98ac", "network": "Cancun", - "postState": {}, + "postState": { + "0x0000000000000000000000000000000000000dad": { + "balance": "0xde0b6b3a7640000" + }, + "0x1111111111111111111111111111111111111111": { + "balance": "0x0", + "code": "0x61face60f01b6000527322222222222222222222222222222222222222226000806002600080855af160008103603457600080fd5b60008060008034865af1905060008103604c57600080fd5b5050" + }, + "0x2222222222222222222222222222222222222222": { + "balance": "0x12a05f200", + "code": "0x6000357fface000000000000000000000000000000000000000000000000000000000000808203602f57610dad80ff5b5050" + } + }, "pre": { "0x1111111111111111111111111111111111111111": { "balance": "0x0", @@ -167,7 +179,18 @@ }, "lastblockhash": "f7f68f34d07d7acc5dad5ba9bbde99c82347a74471801e7c0c22e5b2ed6d0bc6", "network": "GrayGlacier", - "postState": {}, + "postState": { + "0x0000000000000000000000000000000000000dad": { + "balance": "0xde0b6b3a7640000" + }, + "0x1111111111111111111111111111111111111111": { + "balance": "0x0", + "code": "0x61face60f01b6000527322222222222222222222222222222222222222226000806002600080855af160008103603457600080fd5b60008060008034865af1905060008103604c57600080fd5b5050" + }, + "0x2222222222222222222222222222222222222222": { + "balance": "0x0" + } + }, "pre": { "0x1111111111111111111111111111111111111111": { "balance": "0x0",