From 04a1d11b389c71d18a072b6610b11d6fbfc32411 Mon Sep 17 00:00:00 2001 From: Marius van der Wijden Date: Tue, 18 Feb 2025 16:11:17 +0100 Subject: [PATCH] core/txpool/legacypool: add setCodeTx reorg test --- core/txpool/legacypool/legacypool_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/txpool/legacypool/legacypool_test.go b/core/txpool/legacypool/legacypool_test.go index 7067de4840..7e35e0cc60 100644 --- a/core/txpool/legacypool/legacypool_test.go +++ b/core/txpool/legacypool/legacypool_test.go @@ -2427,7 +2427,7 @@ func TestSetCodeTransactionsReorg(t *testing.T) { } // Simulate the chain moving blockchain.statedb.SetNonce(addrA, 1, tracing.NonceChangeAuthorization) - blockchain.statedb.SetState(addrA, common.Hash{}, common.Hash{0x42}) + blockchain.statedb.SetCode(addrA, types.AddressToDelegation(auth.Address)) <-pool.requestReset(nil, nil) // Set an authorization for 0x00 auth, _ = types.SignSetCode(keyA, types.SetCodeAuthorization{ @@ -2445,7 +2445,7 @@ func TestSetCodeTransactionsReorg(t *testing.T) { } // Simulate the chain moving blockchain.statedb.SetNonce(addrA, 2, tracing.NonceChangeAuthorization) - blockchain.statedb.SetState(addrA, common.Hash{}, common.Hash{}) + blockchain.statedb.SetCode(addrA, nil) <-pool.requestReset(nil, nil) // Now send two transactions from addrA if err := pool.addRemoteSync(pricedTransaction(2, 100000, big.NewInt(1000), keyA)); err != nil {