Skip to content

Commit 02f6188

Browse files
authored
Do not count 0-fee txes for fee estimation (#3037)
1 parent 51c8424 commit 02f6188

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/validation.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -687,8 +687,8 @@ static bool AcceptToMemoryPoolWorker(const CChainParams& chainparams, CTxMemPool
687687

688688
// This transaction should only count for fee estimation if the
689689
// node is not behind, and the transaction is not dependent on any other
690-
// transactions in the mempool.
691-
bool validForFeeEstimation = IsCurrentForFeeEstimation() && pool.HasNoInputsOf(tx);
690+
// transactions in the mempool. Also ignore 0-fee txes.
691+
bool validForFeeEstimation = (nFees != 0) && IsCurrentForFeeEstimation() && pool.HasNoInputsOf(tx);
692692

693693
// Store transaction in memory
694694
pool.addUnchecked(hash, entry, setAncestors, validForFeeEstimation);

0 commit comments

Comments
 (0)