From 604dac0bd9c92084ac8852a8a61380dcbcf7ba3d Mon Sep 17 00:00:00 2001 From: Dave Collins Date: Mon, 16 May 2022 21:58:15 -0500 Subject: [PATCH] mempool: Remove agenda from pruneStakeTx. This removes the treasury agenda flag from the unexported pruneStakeTx method since it is no longer used. --- internal/mempool/mempool.go | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/internal/mempool/mempool.go b/internal/mempool/mempool.go index d47cc45b..46a88164 100644 --- a/internal/mempool/mempool.go +++ b/internal/mempool/mempool.go @@ -1987,9 +1987,7 @@ func (mp *TxPool) processOrphans(acceptedTx *dcrutil.Tx, checkTxFlags blockchain // PruneStakeTx. See the comment for PruneStakeTx for more details. // // This function MUST be called with the mempool lock held (for writes). -func (mp *TxPool) pruneStakeTx(requiredStakeDifficulty, height int64, - isTreasuryEnabled, isAutoRevocationsEnabled bool) { - +func (mp *TxPool) pruneStakeTx(requiredStakeDifficulty, height int64, isAutoRevocationsEnabled bool) { for _, txDesc := range mp.pool { txType := txDesc.Type if txType == stake.TxTypeSStx && @@ -2052,11 +2050,6 @@ func (mp *TxPool) pruneStakeTx(requiredStakeDifficulty, height int64, // pruned from mempool since they will never be mined. The same idea stands // for SSGen and SSRtx func (mp *TxPool) PruneStakeTx(requiredStakeDifficulty, height int64) { - isTreasuryEnabled, err := mp.cfg.IsTreasuryAgendaActive() - if err != nil { - return - } - isAutoRevocationsEnabled, err := mp.cfg.IsAutoRevocationsAgendaActive() if err != nil { return @@ -2064,8 +2057,7 @@ func (mp *TxPool) PruneStakeTx(requiredStakeDifficulty, height int64) { // Protect concurrent access. mp.mtx.Lock() - mp.pruneStakeTx(requiredStakeDifficulty, height, isTreasuryEnabled, - isAutoRevocationsEnabled) + mp.pruneStakeTx(requiredStakeDifficulty, height, isAutoRevocationsEnabled) mp.mtx.Unlock() }