diff --git a/core/vm/gas.go b/core/vm/gas.go index 64409383b2..be4304abe9 100644 --- a/core/vm/gas.go +++ b/core/vm/gas.go @@ -96,9 +96,9 @@ func calcQuadMemGas(mem *Memory, newMemSize uint64) (uint64, bool) { return 0, false } -// jitBaseCalc is the same as baseCheck except it doesn't do the look up in the +// baseCalc is the same as baseCheck except it doesn't do the look up in the // gas table. This is done during compilation instead. -func jitBaseCalc(instr instruction, stack *Stack) (uint64, error) { +func baseCalc(instr instruction, stack *Stack) (uint64, error) { err := stack.require(instr.spop) if err != nil { return 0, err diff --git a/core/vm/instructions.go b/core/vm/instructions.go index e7f832bc62..70b32e8e52 100644 --- a/core/vm/instructions.go +++ b/core/vm/instructions.go @@ -60,7 +60,7 @@ func jump(mapping map[uint64]uint64, destinations map[uint64]struct{}, contract func (instr instruction) do(vm *EVM, program *Program, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *Stack) ([]byte, error) { // calculate the new memory size and gas price for the current executing opcode - newMemSize, cost, err := jitCalculateGasAndSize(vm.gasTable, env, contract, instr, env.Db(), memory, stack) + newMemSize, cost, err := calculateGasAndSize(vm.gasTable, env, contract, instr, env.Db(), memory, stack) if err != nil { return nil, err } diff --git a/core/vm/program.go b/core/vm/program.go index e0ccf48b80..ebfe314db6 100644 --- a/core/vm/program.go +++ b/core/vm/program.go @@ -308,15 +308,15 @@ func validDest(dests map[uint64]struct{}, dest *big.Int) bool { return ok } -// jitCalculateGasAndSize calculates the required given the opcode and stack items calculates the new memorysize for +// calculateGasAndSize calculates the required given the opcode and stack items calculates the new memorysize for // the operation. This does not reduce gas or resizes the memory. -func jitCalculateGasAndSize(gasTable params.GasTable, env Environment, contract *Contract, instr instruction, statedb Database, mem *Memory, stack *Stack) (uint64, uint64, error) { +func calculateGasAndSize(gasTable params.GasTable, env Environment, contract *Contract, instr instruction, statedb Database, mem *Memory, stack *Stack) (uint64, uint64, error) { var ( newMemSize, memGas uint64 sizeFault bool ) - gas, err := jitBaseCalc(instr, stack) + gas, err := baseCalc(instr, stack) if err != nil { return 0, 0, err }