aboutsummaryrefslogtreecommitdiffstats
path: root/core/vm/gas.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/vm/gas.go')
-rw-r--r--core/vm/gas.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/vm/gas.go b/core/vm/gas.go
index b2f068e6e..bff0ac91b 100644
--- a/core/vm/gas.go
+++ b/core/vm/gas.go
@@ -37,6 +37,7 @@ var (
GasContractByte = big.NewInt(200)
)
+// baseCheck checks for any stack error underflows
func baseCheck(op OpCode, stack *stack, gas *big.Int) error {
// PUSH and DUP are a bit special. They all cost the same but we do want to have checking on stack push limit
// PUSH is also allowed to calculate the same price for all PUSHes
@@ -63,6 +64,7 @@ func baseCheck(op OpCode, stack *stack, gas *big.Int) error {
return nil
}
+// casts a arbitrary number to the amount of words (sets of 32 bytes)
func toWordSize(size *big.Int) *big.Int {
tmp := new(big.Int)
tmp.Add(size, u256(31))