Skip to content

Commit

Permalink
atomic check
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenlanders committed Jan 26, 2024
1 parent bc43705 commit 61aad30
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/mempool/mempool.go
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,8 @@ func (txmp *TxMempool) CheckTx(
}

func (txmp *TxMempool) isInMempool(tx types.Tx) bool {
return txmp.txStore.GetTxByHash(tx.Key()) != nil && !txmp.txStore.GetTxByHash(tx.Key()).removed
existingTx := txmp.txStore.GetTxByHash(tx.Key())
return existingTx != nil && !existingTx.removed
}

func (txmp *TxMempool) RemoveTxByKey(txKey types.TxKey) error {
Expand Down

0 comments on commit 61aad30

Please sign in to comment.