|
|
|
@ -1289,13 +1289,17 @@ func (api *BlockChainAPI) SimulateV1(ctx context.Context, opts simOpts, blockNrO |
|
|
|
|
if state == nil || err != nil { |
|
|
|
|
return nil, err |
|
|
|
|
} |
|
|
|
|
gasCap := api.b.RPCGasCap() |
|
|
|
|
if gasCap == 0 { |
|
|
|
|
gasCap = math.MaxUint64 |
|
|
|
|
} |
|
|
|
|
sim := &simulator{ |
|
|
|
|
b: api.b, |
|
|
|
|
state: state, |
|
|
|
|
base: base, |
|
|
|
|
chainConfig: api.b.ChainConfig(), |
|
|
|
|
// Each tx and all the series of txes shouldn't consume more gas than cap
|
|
|
|
|
gp: new(core.GasPool).AddGas(api.b.RPCGasCap()), |
|
|
|
|
gp: new(core.GasPool).AddGas(gasCap), |
|
|
|
|
traceTransfers: opts.TraceTransfers, |
|
|
|
|
validate: opts.Validation, |
|
|
|
|
fullTx: opts.ReturnFullTransactions, |
|
|
|
|