Skip to content

Commit

Permalink
Merge branch 'feat/relaxed-mempool-locking' into fix-mempool-spam
Browse files Browse the repository at this point in the history
  • Loading branch information
lklimek committed Feb 12, 2024
2 parents 5a27b68 + e2718ef commit 8101f0c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/mempool/mempool.go
Original file line number Diff line number Diff line change
Expand Up @@ -547,9 +547,9 @@ func (txmp *TxMempool) addNewTransaction(wtx *WrappedTx, checkTxRes *abci.Respon
}
}

haveSpace := len(victims) != 0 && victimBytes >= wtx.Size()
haveSpace := victimBytes >= wtx.Size()
txmp.logger.Debug("addNewTransaction haveSpace", "have_space", haveSpace, "victims", victims)
if !haveSpace {
if haveSpace {
// Sort lowest priority items first so they will be evicted first. Break
// ties in favor of newer items (to maintain FIFO semantics in a group).
sort.Slice(victims, func(i, j int) bool {
Expand Down

0 comments on commit 8101f0c

Please sign in to comment.