diff --git a/mempool/check_tx.go b/mempool/check_tx.go index 33eeb12..0700a21 100644 --- a/mempool/check_tx.go +++ b/mempool/check_tx.go @@ -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