Skip to content

Commit

Permalink
Problem: mempool.GasTx interface is not reused (cosmos#536)
Browse files Browse the repository at this point in the history
* Problem: redundant mutex for InsertWithGasWanted

cfg of PriorityNonceMempool remains unchanged once assigned, so no lock is required

* make mocks

* cleanup

* keep order of check MaxTx
  • Loading branch information
mmsqe committed Jan 9, 2025
1 parent 28d778f commit affda3d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions baseapp/abci_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,7 @@ func (h *DefaultProposalHandler) PrepareProposalHandler() sdk.PrepareProposalHan
if h.mempool == nil || isNoOp {
for i, tx := range decodedTxs {
var txGasLimit uint64
if gasTx, ok := tx.(interface {
GetGas() uint64
}); ok {
if gasTx, ok := tx.(mempool.GasTx); ok {
txGasLimit = gasTx.GetGas()
}

Expand Down

0 comments on commit affda3d

Please sign in to comment.