all: switch gas limits from big.Int to uint64
This commit is contained in:
@ -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...)
|
||||
|
Reference in New Issue
Block a user