|
|
@ -827,7 +827,8 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C |
|
|
|
// subsequent RemoveStaged() and addUnchecked() calls don't guarantee
|
|
|
|
// subsequent RemoveStaged() and addUnchecked() calls don't guarantee
|
|
|
|
// mempool consistency for us.
|
|
|
|
// mempool consistency for us.
|
|
|
|
LOCK(pool.cs); |
|
|
|
LOCK(pool.cs); |
|
|
|
if (setConflicts.size()) |
|
|
|
const bool fReplacementTransaction = setConflicts.size(); |
|
|
|
|
|
|
|
if (fReplacementTransaction) |
|
|
|
{ |
|
|
|
{ |
|
|
|
CFeeRate newFeeRate(nModifiedFees, nSize); |
|
|
|
CFeeRate newFeeRate(nModifiedFees, nSize); |
|
|
|
set<uint256> setConflictsParents; |
|
|
|
set<uint256> setConflictsParents; |
|
|
@ -991,10 +992,11 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C |
|
|
|
} |
|
|
|
} |
|
|
|
pool.RemoveStaged(allConflicting, false, MemPoolRemovalReason::REPLACED); |
|
|
|
pool.RemoveStaged(allConflicting, false, MemPoolRemovalReason::REPLACED); |
|
|
|
|
|
|
|
|
|
|
|
// This transaction should only count for fee estimation if
|
|
|
|
// This transaction should only count for fee estimation if it isn't a
|
|
|
|
// the node is not behind and it is not dependent on any other
|
|
|
|
// BIP 125 replacement transaction (may not be widely supported), the
|
|
|
|
// transactions in the mempool
|
|
|
|
// node is not behind, and the transaction is not dependent on any other
|
|
|
|
bool validForFeeEstimation = IsCurrentForFeeEstimation() && pool.HasNoInputsOf(tx); |
|
|
|
// transactions in the mempool.
|
|
|
|
|
|
|
|
bool validForFeeEstimation = !fReplacementTransaction && IsCurrentForFeeEstimation() && pool.HasNoInputsOf(tx); |
|
|
|
|
|
|
|
|
|
|
|
// Store transaction in memory
|
|
|
|
// Store transaction in memory
|
|
|
|
pool.addUnchecked(hash, entry, setAncestors, validForFeeEstimation); |
|
|
|
pool.addUnchecked(hash, entry, setAncestors, validForFeeEstimation); |
|
|
|