diff options
author | Alex Morcos <morcos@chaincode.com> | 2016-11-11 13:14:45 -0500 |
---|---|---|
committer | Alex Morcos <morcos@chaincode.com> | 2017-01-04 12:09:34 -0500 |
commit | d825838e6472f73c491f93506cb003472f071602 (patch) | |
tree | fac9c77e0b7b6c6cb2b5b198a31cf20ed1dc56a2 /src/policy/fees.cpp | |
parent | 6f06b268c1f383affb2cf397f325d48d25bc8880 (diff) | |
download | bitcoin-d825838e6472f73c491f93506cb003472f071602.tar.xz |
Always update fee estimates on new blocks.
All decisions about whether the transactions are valid data points are made at the time the transaction arrives. Updating on blocks all the time will now cause stale fee estimates to decay quickly when we restart a node.
Diffstat (limited to 'src/policy/fees.cpp')
-rw-r--r-- | src/policy/fees.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/policy/fees.cpp b/src/policy/fees.cpp index 6b4567d195..eb9fdc77d3 100644 --- a/src/policy/fees.cpp +++ b/src/policy/fees.cpp @@ -359,7 +359,7 @@ void CBlockPolicyEstimator::processBlockTx(unsigned int nBlockHeight, const CTxM } void CBlockPolicyEstimator::processBlock(unsigned int nBlockHeight, - std::vector<CTxMemPoolEntry>& entries, bool fCurrentEstimate) + std::vector<CTxMemPoolEntry>& entries) { if (nBlockHeight <= nBestSeenHeight) { // Ignore side chains and re-orgs; assuming they are random @@ -370,11 +370,6 @@ void CBlockPolicyEstimator::processBlock(unsigned int nBlockHeight, return; } - // Only want to be updating estimates when our blockchain is synced, - // otherwise we'll miscalculate how many blocks its taking to get included. - if (!fCurrentEstimate) - return; - // Must update nBestSeenHeight in sync with ClearCurrent so that // calls to removeTx (via processBlockTx) correctly calculate age // of unconfirmed txs to remove from tracking. |