internal/ethapi: fix gascap 0 for eth_simulateV1 (#30496)
Similar to #30474.
This commit is contained in:
parent
2278647ef2
commit
f2e13c7e33
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue