Remove double sha hashing (#517)

This commit is contained in:
Dev Ojha 2024-06-18 11:21:59 -04:00 committed by GitHub
parent 85c537bcc5
commit 2ae5b146a6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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,
@ -80,7 +81,7 @@ func (m MempoolParityCheckTx) CheckTx() CheckTx {
// the app-side mempool
if isInvalidCheckTxExecution(res, checkTxError) && 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(