From 17d6010bd5c58e724111e62e5c2cff2f15daa511 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Thu, 25 Jul 2019 02:26:25 +0300 Subject: [PATCH] Do not count 0-fee txes for fee estimation. --- src/validation.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/validation.cpp b/src/validation.cpp index 0623a5c9e15ff..40d64a107b1f7 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -686,8 +686,8 @@ static bool AcceptToMemoryPoolWorker(const CChainParams& chainparams, CTxMemPool // 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);