From e02c8a1d72c55d239f136538fe4c27326def246a Mon Sep 17 00:00:00 2001 From: Dave Collins Date: Mon, 16 May 2022 21:37:39 -0500 Subject: [PATCH] mempool: Remove agendas from limitNumOrphans. This removes the treasury and auto revocations agenda flags from the unexported limitNumOrphans method since they are no longer used. --- internal/mempool/mempool.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/mempool/mempool.go b/internal/mempool/mempool.go index 4d7b987f..09c399e3 100644 --- a/internal/mempool/mempool.go +++ b/internal/mempool/mempool.go @@ -475,7 +475,7 @@ func (mp *TxPool) RemoveOrphansByTag(tag Tag, isTreasuryEnabled, // orphan if adding a new one would cause it to overflow the max allowed. // // This function MUST be called with the mempool lock held (for writes). -func (mp *TxPool) limitNumOrphans(isTreasuryEnabled, isAutoRevocationsEnabled bool) { +func (mp *TxPool) limitNumOrphans() { // Scan through the orphan pool and remove any expired orphans when it's // time. This is done for efficiency so the scan only happens periodically // instead of on every orphan added to the pool. @@ -534,7 +534,7 @@ func (mp *TxPool) addOrphan(tx *dcrutil.Tx, tag Tag, isTreasuryEnabled, // Limit the number orphan transactions to prevent memory exhaustion. // This will periodically remove any expired orphans and evict a random // orphan if space is still needed. - mp.limitNumOrphans(isTreasuryEnabled, isAutoRevocationsEnabled) + mp.limitNumOrphans() mp.orphans[*tx.Hash()] = &orphanTx{ tx: tx,