-
Notifications
You must be signed in to change notification settings - Fork 21.5k
internal/ethapi: support unlimited rpc gas cap in eth_createAccessList #28846
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
53f7872
76cad9b
9424531
2eea30d
ee59f15
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -96,7 +96,7 @@ func (args *TransactionArgs) data() []byte { | |
| } | ||
|
|
||
| // setDefaults fills in default values for unspecified tx fields. | ||
| func (args *TransactionArgs) setDefaults(ctx context.Context, b Backend) error { | ||
| func (args *TransactionArgs) setDefaults(ctx context.Context, b Backend, infiniteGas bool) error { | ||
| if err := args.setBlobTxSidecar(ctx, b); err != nil { | ||
| return err | ||
| } | ||
|
|
@@ -135,6 +135,12 @@ func (args *TransactionArgs) setDefaults(ctx context.Context, b Backend) error { | |
| return errors.New(`contract creation without any data provided`) | ||
| } | ||
| } | ||
| // Assign a very high gas limit for cases where an accurate gas limit is not critical, | ||
|
||
| // but need to ensure that gas is sufficient. | ||
| if infiniteGas { | ||
| tmp := hexutil.Uint64(math.MaxUint64 / 2) | ||
| args.Gas = &tmp | ||
|
||
| } | ||
|
|
||
| // Estimate the gas usage if necessary. | ||
| if args.Gas == nil { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍