mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
internal/ethapi: set block gas limit as msg gas limit when rpc gas cap is set 0 (infinite)
This commit is contained in:
parent
f55a10b64d
commit
53f7872936
1 changed files with 7 additions and 2 deletions
|
|
@ -1513,8 +1513,13 @@ func AccessList(ctx context.Context, b Backend, blockNrOrHash rpc.BlockNumberOrH
|
||||||
}
|
}
|
||||||
// If the gas amount is not set, default to RPC gas cap.
|
// If the gas amount is not set, default to RPC gas cap.
|
||||||
if args.Gas == nil {
|
if args.Gas == nil {
|
||||||
tmp := hexutil.Uint64(b.RPCGasCap())
|
if b.RPCGasCap() != 0 {
|
||||||
args.Gas = &tmp
|
tmp := hexutil.Uint64(b.RPCGasCap())
|
||||||
|
args.Gas = &tmp
|
||||||
|
} else {
|
||||||
|
tmp := hexutil.Uint64(b.CurrentBlock().GasLimit)
|
||||||
|
args.Gas = &tmp
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ensure any missing fields are filled, extract the recipient and input data
|
// Ensure any missing fields are filled, extract the recipient and input data
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue