Do not count 0-fee txes for fee estimation (#3037)

This commit is contained in:
UdjinM6 2019-08-01 17:50:23 +03:00 committed by Alexander Block
parent 974055a9b6
commit b1ffedb2dd

View File

@ -883,8 +883,8 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C
// This transaction should only count for fee estimation if the // This transaction should only count for fee estimation if the
// node is not behind, and the transaction is not dependent on any other // node is not behind, and the transaction is not dependent on any other
// transactions in the mempool. // transactions in the mempool. Also ignore 0-fee txes.
bool validForFeeEstimation = IsCurrentForFeeEstimation() && pool.HasNoInputsOf(tx); bool validForFeeEstimation = (nFees != 0) && IsCurrentForFeeEstimation() && pool.HasNoInputsOf(tx);
// Store transaction in memory // Store transaction in memory
pool.addUnchecked(hash, entry, setAncestors, validForFeeEstimation); pool.addUnchecked(hash, entry, setAncestors, validForFeeEstimation);