test fixes

This commit is contained in:
Marius van der Wijden 2026-04-22 11:27:38 +02:00
parent 631da84301
commit 2fd7ec37ed
3 changed files with 4 additions and 2 deletions

View file

@ -572,6 +572,7 @@ func (s *stateObject) deepCopy(db *StateDB) *stateObject {
dirtyCode: s.dirtyCode, dirtyCode: s.dirtyCode,
selfDestructed: s.selfDestructed, selfDestructed: s.selfDestructed,
newContract: s.newContract, newContract: s.newContract,
txPreBalance: s.txPreBalance.Clone(),
} }
switch s.trie.(type) { switch s.trie.(type) {

View file

@ -469,6 +469,7 @@ func TestEIP8037MaxRegularGasValidation(t *testing.T) {
Amsterdam: params.DefaultOsakaBlobConfig, Amsterdam: params.DefaultOsakaBlobConfig,
}, },
} }
rules = config.Rules(common.Big0, true, 0)
signer = types.LatestSigner(config) signer = types.LatestSigner(config)
key1, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291") key1, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291")
) )
@ -486,7 +487,7 @@ func TestEIP8037MaxRegularGasValidation(t *testing.T) {
} }
// Verify that floor data gas exceeds MaxTxGas // Verify that floor data gas exceeds MaxTxGas
floorGas, err := FloorDataGas(largeData) floorGas, err := FloorDataGas(rules, largeData)
if err != nil { if err != nil {
t.Fatalf("Failed to calculate floor data gas: %v", err) t.Fatalf("Failed to calculate floor data gas: %v", err)
} }

View file

@ -82,7 +82,7 @@ func (tt *TransactionTest) Run() error {
} }
// Intrinsic cost // Intrinsic cost
// TODO (MariusVanDerWijden): correctly set this for post-amsterdam tests. // 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 { if err != nil {
return return
} }