From ee5dd8673f672b48fb7810d8914d589e2cec3d59 Mon Sep 17 00:00:00 2001 From: Daniel Liu Date: Wed, 25 Sep 2024 17:14:42 +0800 Subject: [PATCH] core/vm: remove empty lines --- core/vm/instructions_test.go | 3 --- core/vm/interpreter.go | 1 - core/vm/runtime/runtime_test.go | 1 - 3 files changed, 5 deletions(-) diff --git a/core/vm/instructions_test.go b/core/vm/instructions_test.go index 25dceabd5a..a9ab947c22 100644 --- a/core/vm/instructions_test.go +++ b/core/vm/instructions_test.go @@ -47,7 +47,6 @@ var commonParams []*twoOperandParams var twoOpMethods map[string]executionFunc func init() { - // Params is a list of common edgecases that should be used for some common tests params := []string{ "0000000000000000000000000000000000000000000000000000000000000000", // 0 @@ -93,7 +92,6 @@ func init() { } func testTwoOperandOp(t *testing.T, tests []TwoOperandTestcase, opFn executionFunc, name string) { - var ( env = NewEVM(BlockContext{}, TxContext{}, nil, nil, params.TestChainConfig, Config{}) stack = newstack() @@ -648,7 +646,6 @@ func TestCreate2Addreses(t *testing.T) { expected: "0xE33C0C7F7df4809055C3ebA6c09CFe4BaF1BD9e0", }, } { - origin := common.BytesToAddress(common.FromHex(tt.origin)) salt := common.BytesToHash(common.FromHex(tt.salt)) code := common.FromHex(tt.code) diff --git a/core/vm/interpreter.go b/core/vm/interpreter.go index c4b4b4143b..ebfaa6387c 100644 --- a/core/vm/interpreter.go +++ b/core/vm/interpreter.go @@ -145,7 +145,6 @@ func NewEVMInterpreter(evm *EVM, cfg Config) *EVMInterpreter { // considered a revert-and-consume-all-gas operation except for // ErrExecutionReverted which means revert-and-keep-gas-left. func (in *EVMInterpreter) Run(contract *Contract, input []byte, readOnly bool) (ret []byte, err error) { - // Increment the call depth which is restricted to 1024 in.evm.depth++ defer func() { in.evm.depth-- }() diff --git a/core/vm/runtime/runtime_test.go b/core/vm/runtime/runtime_test.go index 34031a95e9..fc986c3a76 100644 --- a/core/vm/runtime/runtime_test.go +++ b/core/vm/runtime/runtime_test.go @@ -374,7 +374,6 @@ func benchmarkNonModifyingCode(gas uint64, code []byte, name string, b *testing. // BenchmarkSimpleLoop test a pretty simple loop which loops until OOG // 55 ms func BenchmarkSimpleLoop(b *testing.B) { - staticCallIdentity := []byte{ byte(vm.JUMPDEST), // [ count ] // push args for the call