aboutsummaryrefslogtreecommitdiffstats
path: root/les/odr_test.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-11-13 19:47:27 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-01-03 20:45:35 +0800
commit6f69cdd109b1dd692b8dfb15e7c53d2051fbc946 (patch)
treec92974f8b82209073ad1ee3faec6e149f834bf69 /les/odr_test.go
parentb8caba97099ee5eed33c3b80dd4ea540722e7d8f (diff)
downloaddexon-6f69cdd109b1dd692b8dfb15e7c53d2051fbc946.tar.gz
dexon-6f69cdd109b1dd692b8dfb15e7c53d2051fbc946.tar.zst
dexon-6f69cdd109b1dd692b8dfb15e7c53d2051fbc946.zip
all: switch gas limits from big.Int to uint64
Diffstat (limited to 'les/odr_test.go')
-rw-r--r--les/odr_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/les/odr_test.go b/les/odr_test.go
index 865f5d83e..cf609be88 100644
--- a/les/odr_test.go
+++ b/les/odr_test.go
@@ -129,13 +129,13 @@ func odrContractCall(ctx context.Context, db ethdb.Database, config *params.Chai
from := statedb.GetOrNewStateObject(testBankAddress)
from.SetBalance(math.MaxBig256)
- msg := callmsg{types.NewMessage(from.Address(), &testContractAddr, 0, new(big.Int), big.NewInt(100000), new(big.Int), data, false)}
+ msg := callmsg{types.NewMessage(from.Address(), &testContractAddr, 0, new(big.Int), 100000, new(big.Int), data, false)}
context := core.NewEVMContext(msg, header, bc, nil)
vmenv := vm.NewEVM(context, statedb, config, vm.Config{})
//vmenv := core.NewEnv(statedb, config, bc, msg, header, vm.Config{})
- gp := new(core.GasPool).AddGas(math.MaxBig256)
+ gp := new(core.GasPool).AddGas(math.MaxUint64)
ret, _, _, _ := core.ApplyMessage(vmenv, msg, gp)
res = append(res, ret...)
}
@@ -143,10 +143,10 @@ func odrContractCall(ctx context.Context, db ethdb.Database, config *params.Chai
header := lc.GetHeaderByHash(bhash)
state := light.NewState(ctx, header, lc.Odr())
state.SetBalance(testBankAddress, math.MaxBig256)
- msg := callmsg{types.NewMessage(testBankAddress, &testContractAddr, 0, new(big.Int), big.NewInt(100000), new(big.Int), data, false)}
+ msg := callmsg{types.NewMessage(testBankAddress, &testContractAddr, 0, new(big.Int), 100000, new(big.Int), data, false)}
context := core.NewEVMContext(msg, header, lc, nil)
vmenv := vm.NewEVM(context, state, config, vm.Config{})
- gp := new(core.GasPool).AddGas(math.MaxBig256)
+ gp := new(core.GasPool).AddGas(math.MaxUint64)
ret, _, _, _ := core.ApplyMessage(vmenv, msg, gp)
if state.Error() == nil {
res = append(res, ret...)