diff --git a/internal/mempool/mempool.go b/internal/mempool/mempool.go index 86019b36..e8ae400f 100644 --- a/internal/mempool/mempool.go +++ b/internal/mempool/mempool.go @@ -444,9 +444,7 @@ func (mp *TxPool) removeOrphan(tx *dcrutil.Tx, removeRedeemers bool) { // previous orphan index. // // This function is safe for concurrent access. -func (mp *TxPool) RemoveOrphan(tx *dcrutil.Tx, isTreasuryEnabled, - isAutoRevocationsEnabled bool) { - +func (mp *TxPool) RemoveOrphan(tx *dcrutil.Tx) { mp.mtx.Lock() mp.removeOrphan(tx, false) mp.mtx.Unlock() @@ -1555,8 +1553,7 @@ func (mp *TxPool) maybeAcceptTransaction(tx *dcrutil.Tx, isNew, rateLimit, // Don't allow transactions with non-standard inputs if the mempool config // forbids their acceptance and relaying. if !mp.cfg.Policy.AcceptNonStd { - err := checkInputsStandard(tx, txType, utxoView, - isTreasuryEnabled) + err := checkInputsStandard(tx, txType, utxoView, isTreasuryEnabled) if err != nil { str := fmt.Sprintf("transaction %v has a non-standard "+ "input: %v", txHash, err) diff --git a/internal/mempool/mempool_test.go b/internal/mempool/mempool_test.go index 33ffbcbe..f123242b 100644 --- a/internal/mempool/mempool_test.go +++ b/internal/mempool/mempool_test.go @@ -1455,7 +1455,7 @@ func TestBasicOrphanRemoval(t *testing.T) { t.Fatalf("unable to create signed tx: %v", err) } - harness.txPool.RemoveOrphan(nonChainedOrphanTx, noTreasury, noAutoRevocations) + harness.txPool.RemoveOrphan(nonChainedOrphanTx) testPoolMembership(tc, nonChainedOrphanTx, false, false) for _, tx := range chainedTxns[1 : maxOrphans+1] { testPoolMembership(tc, tx, true, false) @@ -1464,7 +1464,7 @@ func TestBasicOrphanRemoval(t *testing.T) { // Attempt to remove an orphan that has an existing redeemer but itself // is not present and ensure the state of all other orphans (including // the one that redeems it) are unaffected. - harness.txPool.RemoveOrphan(chainedTxns[0], noTreasury, noAutoRevocations) + harness.txPool.RemoveOrphan(chainedTxns[0]) testPoolMembership(tc, chainedTxns[0], false, false) for _, tx := range chainedTxns[1 : maxOrphans+1] { testPoolMembership(tc, tx, true, false) @@ -1473,7 +1473,7 @@ func TestBasicOrphanRemoval(t *testing.T) { // Remove each orphan one-by-one and ensure they are removed as // expected. for _, tx := range chainedTxns[1 : maxOrphans+1] { - harness.txPool.RemoveOrphan(tx, noTreasury, noAutoRevocations) + harness.txPool.RemoveOrphan(tx) testPoolMembership(tc, tx, false, false) } } diff --git a/server.go b/server.go index 4202ce97..c58d9be5 100644 --- a/server.go +++ b/server.go @@ -2698,7 +2698,7 @@ func (s *server) handleBlockchainNotification(notification *blockchain.Notificat txMemPool.MaybeAcceptDependents(tx, isTreasuryEnabled) txMemPool.RemoveDoubleSpends(tx, isTreasuryEnabled, isAutoRevocationsEnabled) - txMemPool.RemoveOrphan(tx, isTreasuryEnabled, isAutoRevocationsEnabled) + txMemPool.RemoveOrphan(tx) acceptedTxs := txMemPool.ProcessOrphans(tx, ntfn.CheckTxFlags) s.AnnounceNewTransactions(acceptedTxs) @@ -2822,7 +2822,7 @@ func (s *server) handleBlockchainNotification(notification *blockchain.Notificat txMemPool.MaybeAcceptDependents(tx, isTreasuryEnabled) txMemPool.RemoveDoubleSpends(tx, isTreasuryEnabled, isAutoRevocationsEnabled) - txMemPool.RemoveOrphan(tx, isTreasuryEnabled, isAutoRevocationsEnabled) + txMemPool.RemoveOrphan(tx) txMemPool.ProcessOrphans(tx, ntfn.CheckTxFlags) } }