Skip to content

Commit

Permalink
Remove double sha hashing (#517)
Browse files Browse the repository at this point in the history
(cherry picked from commit 2ae5b14)
  • Loading branch information
ValarDragon authored and mergify[bot] committed Jun 18, 2024
1 parent c5a8f79 commit 944f685
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions abci/checktx/mempool_parity_check_tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@ func (m MempoolParityCheckTx) CheckTx() CheckTx {
}

isReCheck := req.Type == cmtabci.CheckTxType_Recheck
txInMempool := m.mempl.Contains(tx)

// if the mode is ReCheck and the app's mempool does not contain the given tx, we fail
// immediately, to purge the tx from the comet mempool.
if isReCheck && !m.mempl.Contains(tx) {
if isReCheck && !txInMempool {
m.logger.Debug(
"tx from comet mempool not found in app-side mempool",
"tx", tx,
Expand All @@ -80,7 +81,7 @@ func (m MempoolParityCheckTx) CheckTx() CheckTx {
// the app-side mempool
if isInvalidCheckTxExecution(res) && isReCheck {
// check if the tx exists first
if m.mempl.Contains(tx) {
if txInMempool {
// remove the tx
if err := m.mempl.Remove(tx); err != nil {
m.logger.Debug(
Expand Down

0 comments on commit 944f685

Please sign in to comment.