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 GitHub
parent 51c84248ad
commit 02f6188e8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -687,8 +687,8 @@ static bool AcceptToMemoryPoolWorker(const CChainParams& chainparams, CTxMemPool
// 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);