aboutsummaryrefslogtreecommitdiffstats
path: root/les/odr_test.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2018-01-03 22:53:06 +0800
committerGitHub <noreply@github.com>2018-01-03 22:53:06 +0800
commit762f3a48a00da02fe58063cb6ce8dc2d08821f15 (patch)
tree783421f8ece4306f69cb17e515ee07c1ab4fe0eb /les/odr_test.go
parentb47285f1cf0cb475f29322ceb9fac4d7e1cfb11f (diff)
parent6f69cdd109b1dd692b8dfb15e7c53d2051fbc946 (diff)
downloaddexon-762f3a48a00da02fe58063cb6ce8dc2d08821f15.tar
dexon-762f3a48a00da02fe58063cb6ce8dc2d08821f15.tar.gz
dexon-762f3a48a00da02fe58063cb6ce8dc2d08821f15.tar.bz2
dexon-762f3a48a00da02fe58063cb6ce8dc2d08821f15.tar.lz
dexon-762f3a48a00da02fe58063cb6ce8dc2d08821f15.tar.xz
dexon-762f3a48a00da02fe58063cb6ce8dc2d08821f15.tar.zst
dexon-762f3a48a00da02fe58063cb6ce8dc2d08821f15.zip
Merge pull request #15466 from karalabe/uint64-gas-limit
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...)