aboutsummaryrefslogtreecommitdiffstats
path: root/tests/vm_test_util.go
diff options
context:
space:
mode:
Diffstat (limited to 'tests/vm_test_util.go')
-rw-r--r--tests/vm_test_util.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/vm_test_util.go b/tests/vm_test_util.go
index 4bf2dbfe9..d2ddee039 100644
--- a/tests/vm_test_util.go
+++ b/tests/vm_test_util.go
@@ -25,6 +25,7 @@ import (
"testing"
"github.com/ethereum/go-ethereum/common"
+ "github.com/ethereum/go-ethereum/common/math"
"github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/core/vm"
@@ -180,7 +181,7 @@ func runVmTest(test VmTest) error {
if len(test.Gas) == 0 && err == nil {
return fmt.Errorf("gas unspecified, indicating an error. VM returned (incorrectly) successful")
} else {
- gexp := common.Big(test.Gas)
+ gexp := math.MustParseBig256(test.Gas)
if gexp.Cmp(gas) != 0 {
return fmt.Errorf("gas failed. Expected %v, got %v\n", gexp, gas)
}
@@ -222,8 +223,8 @@ func RunVm(statedb *state.StateDB, env, exec map[string]string) ([]byte, []*type
to = common.HexToAddress(exec["address"])
from = common.HexToAddress(exec["caller"])
data = common.FromHex(exec["data"])
- gas = common.Big(exec["gas"])
- value = common.Big(exec["value"])
+ gas = math.MustParseBig256(exec["gas"])
+ value = math.MustParseBig256(exec["value"])
)
caller := statedb.GetOrNewStateObject(from)
vm.PrecompiledContracts = make(map[common.Address]vm.PrecompiledContract)