diff options
author | ismaelsadeeq <ask4ismailsadiq@gmail.com> | 2023-11-03 18:34:58 +0100 |
---|---|---|
committer | ismaelsadeeq <ask4ismailsadiq@gmail.com> | 2023-11-22 11:48:21 +0100 |
commit | 714523918ba2b853fc69bee6b04a33ba0c828bf5 (patch) | |
tree | 68b3e867887839f2f2f65e440a5e316a03ed0101 /src/validation.cpp | |
parent | dff5ad3b9944cbb56126ba37a8da180d1327ba39 (diff) |
tx fees, policy: CBlockPolicyEstimator update from `CValidationInterface` notifications
`CBlockPolicyEstimator` will implement `CValidationInterface` and
subscribe to its notification to process transactions added and removed
from the mempool.
Re-delegate calculation of `validForFeeEstimation` from validation to fee estimator.
Also clean up the validForFeeEstimation arg thats no longer needed in `CTxMempool`.
Co-authored-by: Matt Corallo <git@bluematt.me>
Diffstat (limited to 'src/validation.cpp')
-rw-r--r-- | src/validation.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/validation.cpp b/src/validation.cpp index 1c95ba08c5..f9e5d1db82 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -1126,17 +1126,8 @@ bool MemPoolAccept::Finalize(const ATMPArgs& args, Workspace& ws) ws.m_replaced_transactions.push_back(it->GetSharedTx()); } m_pool.RemoveStaged(ws.m_all_conflicting, false, MemPoolRemovalReason::REPLACED); - - // This transaction should only count for fee estimation if: - // - it's not being re-added 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 - // - it's not part of a package. Since package relay is not currently supported, this - // transaction has not necessarily been accepted to miners' mempools. - bool validForFeeEstimation = !bypass_limits && !args.m_package_submission && IsCurrentForFeeEstimation(m_active_chainstate) && m_pool.HasNoInputsOf(tx); - // Store transaction in memory - m_pool.addUnchecked(*entry, ws.m_ancestors, validForFeeEstimation); + m_pool.addUnchecked(*entry, ws.m_ancestors); // trim mempool and check if tx was trimmed // If we are validating a package, don't trim here because we could evict a previous transaction |