From 2fd7ec37ede5094a12de83eda5884fc4c282dc0e Mon Sep 17 00:00:00 2001 From: Marius van der Wijden Date: Wed, 22 Apr 2026 11:27:38 +0200 Subject: [PATCH] test fixes --- core/state/state_object.go | 1 + core/state_processor_test.go | 3 ++- tests/transaction_test_util.go | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/core/state/state_object.go b/core/state/state_object.go index 5a66ba1f7a..33d7b60bee 100644 --- a/core/state/state_object.go +++ b/core/state/state_object.go @@ -572,6 +572,7 @@ func (s *stateObject) deepCopy(db *StateDB) *stateObject { dirtyCode: s.dirtyCode, selfDestructed: s.selfDestructed, newContract: s.newContract, + txPreBalance: s.txPreBalance.Clone(), } switch s.trie.(type) { diff --git a/core/state_processor_test.go b/core/state_processor_test.go index 9f85510269..7b3877b96a 100644 --- a/core/state_processor_test.go +++ b/core/state_processor_test.go @@ -469,6 +469,7 @@ func TestEIP8037MaxRegularGasValidation(t *testing.T) { Amsterdam: params.DefaultOsakaBlobConfig, }, } + rules = config.Rules(common.Big0, true, 0) signer = types.LatestSigner(config) key1, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291") ) @@ -486,7 +487,7 @@ func TestEIP8037MaxRegularGasValidation(t *testing.T) { } // Verify that floor data gas exceeds MaxTxGas - floorGas, err := FloorDataGas(largeData) + floorGas, err := FloorDataGas(rules, largeData) if err != nil { t.Fatalf("Failed to calculate floor data gas: %v", err) } diff --git a/tests/transaction_test_util.go b/tests/transaction_test_util.go index 077db64f39..8d7a7c717a 100644 --- a/tests/transaction_test_util.go +++ b/tests/transaction_test_util.go @@ -82,7 +82,7 @@ func (tt *TransactionTest) Run() error { } // Intrinsic cost // TODO (MariusVanDerWijden): correctly set this for post-amsterdam tests. - cost, err := core.IntrinsicGas(tx.Data(), tx.AccessList(), tx.SetCodeAuthorizations(), tx.To() == nil, *rules, 0) + cost, err := core.IntrinsicGas(tx.Data(), tx.AccessList(), tx.SetCodeAuthorizations(), tx.To() == nil, rules, 0) if err != nil { return }