Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions mempool/check_tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,16 @@ func NewCheckTxHandler(mempool *ExperimentalEVMMempool) types.CheckTxHandler {
return sdkerrors.ResponseCheckTxWithEvents(err, gInfo.GasWanted, gInfo.GasUsed, anteEvents, false), nil
}
}
// If its already known, this can mean the the tx was promoted from nonce gap to valid
// and by allowing ErrAlreadyKnown to be silent, we allow re-gossiping of such txs
// this also covers the case of re-submission of the same tx enforcing overpricing for replacement
if errors.Is(err, txpool.ErrAlreadyKnown) {
return sdkerrors.ResponseCheckTxWithEvents(nil, gInfo.GasWanted, gInfo.GasUsed, anteEvents, false), nil
}

// anything else, return regular error
return sdkerrors.ResponseCheckTxWithEvents(err, gInfo.GasWanted, gInfo.GasUsed, anteEvents, false), nil
}
// If its already known, this can mean the the tx was promoted from nonce gap to valid
// and by allowing ErrAlreadyKnown to be silent, we allow re-gossiping of such txs
// this also covers the case of re-submission of the same tx enforcing overpricing for replacement
if errors.Is(err, txpool.ErrAlreadyKnown) {
return sdkerrors.ResponseCheckTxWithEvents(nil, gInfo.GasWanted, gInfo.GasUsed, anteEvents, false), nil
}

return &abci.ResponseCheckTx{
GasWanted: int64(gInfo.GasWanted), // #nosec G115 -- this is copied from the Cosmos SDK
Expand Down
Loading