aboutsummaryrefslogtreecommitdiffstats
path: root/core/vm/jump_table.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/vm/jump_table.go')
-rw-r--r--core/vm/jump_table.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/vm/jump_table.go b/core/vm/jump_table.go
index f4ce81883..80e12c10b 100644
--- a/core/vm/jump_table.go
+++ b/core/vm/jump_table.go
@@ -17,6 +17,7 @@
package vm
import (
+ "errors"
"math/big"
"github.com/ethereum/go-ethereum/params"
@@ -24,11 +25,13 @@ import (
type (
executionFunc func(pc *uint64, env *EVM, contract *Contract, memory *Memory, stack *Stack) ([]byte, error)
- gasFunc func(params.GasTable, *EVM, *Contract, *Stack, *Memory, *big.Int) *big.Int
+ gasFunc func(params.GasTable, *EVM, *Contract, *Stack, *Memory, uint64) (uint64, error) // last parameter is the requested memory size as a uint64
stackValidationFunc func(*Stack) error
memorySizeFunc func(*Stack) *big.Int
)
+var errGasUintOverflow = errors.New("gas uint64 overflow")
+
type operation struct {
// op is the operation function
execute executionFunc
@@ -431,7 +434,7 @@ func NewJumpTable() [256]operation {
},
STOP: {
execute: opStop,
- gasCost: constGasFunc(Zero),
+ gasCost: constGasFunc(0),
validateStack: makeStackFunc(0, 0),
halts: true,
valid: true,