diff --git a/core/vm/interface.go b/core/vm/interface.go index 2586154e93..d07572ff65 100644 --- a/core/vm/interface.go +++ b/core/vm/interface.go @@ -101,8 +101,6 @@ type StateDB interface { AccessEvents() *state.AccessEvents - TxIndex() int - // Finalise must be invoked at the end of a transaction Finalise(bool) } diff --git a/core/vm/jump_table_export.go b/core/vm/jump_table_export.go index 4157dddcff..dc63e633bd 100644 --- a/core/vm/jump_table_export.go +++ b/core/vm/jump_table_export.go @@ -29,7 +29,7 @@ func LookupInstructionSet(rules params.Rules) (JumpTable, error) { case rules.IsVerkle: return newCancunInstructionSet(), errors.New("verkle-fork not defined yet") case rules.IsAmsterdam: - return newPragueInstructionSet(), errors.New("glamsterdam-fork not defined yet") + return newPragueInstructionSet(), nil case rules.IsOsaka: return newOsakaInstructionSet(), nil case rules.IsPrague: diff --git a/core/vm/operations_acl.go b/core/vm/operations_acl.go index 669c8b2a34..085b018e4c 100644 --- a/core/vm/operations_acl.go +++ b/core/vm/operations_acl.go @@ -18,6 +18,7 @@ package vm import ( "errors" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/math" "github.com/ethereum/go-ethereum/core/tracing" @@ -122,7 +123,6 @@ func gasExtCodeCopyEIP2929(evm *EVM, contract *Contract, stack *Stack, mem *Memo // Check slot presence in the access list if !evm.StateDB.AddressInAccessList(addr) { evm.StateDB.AddAddressToAccessList(addr) - var overflow bool // We charge (cold-warm), since 'warm' is already charged as constantGas if gas, overflow = math.SafeAdd(gas, params.ColdAccountAccessCostEIP2929-params.WarmStorageReadCostEIP2929); overflow { diff --git a/core/vm/runtime/runtime_test.go b/core/vm/runtime/runtime_test.go index fbdc0efbb0..ddd32df039 100644 --- a/core/vm/runtime/runtime_test.go +++ b/core/vm/runtime/runtime_test.go @@ -312,18 +312,6 @@ func (d *dummyChain) Config() *params.ChainConfig { return nil } -func (d *dummyChain) CurrentHeader() *types.Header { - return nil -} - -func (d *dummyChain) GetHeaderByNumber(n uint64) *types.Header { - return d.GetHeader(common.Hash{}, n) -} - -func (d *dummyChain) GetHeaderByHash(h common.Hash) *types.Header { - return nil -} - // TestBlockhash tests the blockhash operation. It's a bit special, since it internally // requires access to a chain reader. func TestBlockhash(t *testing.T) { @@ -676,7 +664,7 @@ func TestColdAccountAccessCost(t *testing.T) { Tracer: &tracing.Hooks{ OnOpcode: func(pc uint64, op byte, gas, cost uint64, scope tracing.OpContext, rData []byte, depth int, err error) { // Uncomment to investigate failures: - //t.Logf("%d: %v %d", step, vm.OpCode(op).PrettyPrint(), cost) + //t.Logf("%d: %v %d", step, vm.OpCode(op).String(), cost) if step == tc.step { have = cost }