Skip to content

Commit b1ffedb

Browse files
UdjinM6codablock
authored andcommitted
Do not count 0-fee txes for fee estimation (dashpay#3037)
1 parent 974055a commit b1ffedb

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
@@ -883,8 +883,8 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C
883883

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

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

0 commit comments

Comments
 (0)