From b1ffedb2ddc2e0e9be04f134333dd5e7c64ca61f Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Thu, 1 Aug 2019 17:50:23 +0300 Subject: [PATCH] Do not count 0-fee txes for fee estimation (#3037) --- src/validation.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/validation.cpp b/src/validation.cpp index 6422ac2e07b14..18baae56cb821 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -883,8 +883,8 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C // This transaction should only count for fee estimation if the // node is not behind, and the transaction is not dependent on any other - // transactions in the mempool. - bool validForFeeEstimation = IsCurrentForFeeEstimation() && pool.HasNoInputsOf(tx); + // transactions in the mempool. Also ignore 0-fee txes. + bool validForFeeEstimation = (nFees != 0) && IsCurrentForFeeEstimation() && pool.HasNoInputsOf(tx); // Store transaction in memory pool.addUnchecked(hash, entry, setAncestors, validForFeeEstimation);