diff options
author | Alex Morcos <morcos@chaincode.com> | 2017-09-12 12:40:06 -0400 |
---|---|---|
committer | Alex Morcos <morcos@chaincode.com> | 2017-09-12 12:40:06 -0400 |
commit | bf64c3cb34571cfcd2ec4cce29bbf9c49ec3700c (patch) | |
tree | 8728b8df2e061f3f2c56fd55229332a39a63aaa2 /src/validation.cpp | |
parent | 04f78ab5b94424be9cdef86971b7a92de79effa4 (diff) |
Ignore transactions added to mempool during a reorg for fee estimation purposes.
Diffstat (limited to 'src/validation.cpp')
-rw-r--r-- | src/validation.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/validation.cpp b/src/validation.cpp index 347b847342..ab031d76c7 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -857,11 +857,12 @@ static bool AcceptToMemoryPoolWorker(const CChainParams& chainparams, CTxMemPool } pool.RemoveStaged(allConflicting, false, MemPoolRemovalReason::REPLACED); - // This transaction should only count for fee estimation if it isn't a - // BIP 125 replacement transaction (may not be widely supported), the - // node is not behind, and the transaction is not dependent on any other - // transactions in the mempool. - bool validForFeeEstimation = !fReplacementTransaction && IsCurrentForFeeEstimation() && pool.HasNoInputsOf(tx); + // This transaction should only count for fee estimation if: + // - it isn't a BIP 125 replacement transaction (may not be widely supported) + // - it's not being readded during a reorg which bypasses typical mempool fee limits + // - the node is not behind + // - the transaction is not dependent on any other transactions in the mempool + bool validForFeeEstimation = !fReplacementTransaction && !bypass_limits && IsCurrentForFeeEstimation() && pool.HasNoInputsOf(tx); // Store transaction in memory pool.addUnchecked(hash, entry, setAncestors, validForFeeEstimation); |