fix: check tx gas limit against block gas limit (#16547)
Co-authored-by: Facundo Medica <facundomedica@gmail.com> Co-authored-by: Facundo Medica <14063057+facundomedica@users.noreply.github.com>
This commit is contained in:
co-authored by
Facundo Medica
Facundo Medica
parent
6377367e2f
commit
75b4918b94
@@ -44,7 +44,10 @@ Allowing the application to handle ordering enables the application to define ho
|
||||
it would like the block constructed.
|
||||
|
||||
The Cosmos SDK defines the `DefaultProposalHandler` type, which provides applications with
|
||||
`PrepareProposal` and `ProcessProposal` handlers.
|
||||
`PrepareProposal` and `ProcessProposal` handlers. If you decide to implement your
|
||||
own `PrepareProposal` handler, you must be sure to ensure that the transactions
|
||||
selected DO NOT exceed the maximum block gas (if set) and the maximum bytes provided
|
||||
by `req.MaxBytes`.
|
||||
|
||||
```go reference
|
||||
https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/baseapp/baseapp.go#L868-L916
|
||||
@@ -81,7 +84,10 @@ Here is the implementation of the default implementation:
|
||||
https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/baseapp/baseapp.go#L927-L942
|
||||
```
|
||||
|
||||
Like `PrepareProposal` this implementation is the default and can be modified by the application developer in [`app.go`](./01-app-go-v2.md):
|
||||
Like `PrepareProposal` this implementation is the default and can be modified by
|
||||
the application developer in [`app.go`](./01-app-go-v2.md). If you decide to implement
|
||||
your own `ProcessProposal` handler, you must be sure to ensure that the transactions
|
||||
provided in the proposal DO NOT exceed the maximum block gas (if set).
|
||||
|
||||
```go
|
||||
processOpt := func(app *baseapp.BaseApp) {
|
||||
|
||||
Reference in New Issue
Block a user