Browse Source

Fix edge case with stale fee estimates

0.14
Alex Morcos 8 years ago
parent
commit
44b64b933d
  1. 4
      src/policy/fees.cpp

4
src/policy/fees.cpp

@ -321,9 +321,11 @@ void CBlockPolicyEstimator::processTransaction(const CTxMemPoolEntry& entry, boo @@ -321,9 +321,11 @@ void CBlockPolicyEstimator::processTransaction(const CTxMemPoolEntry& entry, boo
return;
}
if (txHeight < nBestSeenHeight) {
if (txHeight != nBestSeenHeight) {
// Ignore side chains and re-orgs; assuming they are random they don't
// affect the estimate. We'll potentially double count transactions in 1-block reorgs.
// Ignore txs if BlockPolicyEstimator is not in sync with chainActive.Tip().
// It will be synced next time a block is processed.
return;
}

Loading…
Cancel
Save