diff --git a/core/state/state_object.go b/core/state/state_object.go index 16daf43830..1d4d434391 100644 --- a/core/state/state_object.go +++ b/core/state/state_object.go @@ -575,6 +575,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 }