diff options
| author | Alex Morcos <[email protected]> | 2016-11-29 15:40:03 -0500 |
|---|---|---|
| committer | Alex Morcos <[email protected]> | 2017-01-04 12:10:18 -0500 |
| commit | 44b64b933dec10f5ffcd7f34e7bf5e4ed97f671e (patch) | |
| tree | d98f7f2cf07945d50805712b5e983a8927861e8c /src/policy/fees.cpp | |
| parent | Add clarifying comments to fee estimation (diff) | |
| download | discoin-44b64b933dec10f5ffcd7f34e7bf5e4ed97f671e.tar.xz discoin-44b64b933dec10f5ffcd7f34e7bf5e4ed97f671e.zip | |
Fix edge case with stale fee estimates
Diffstat (limited to 'src/policy/fees.cpp')
| -rw-r--r-- | src/policy/fees.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/policy/fees.cpp b/src/policy/fees.cpp index f1c93a497..5407aefb4 100644 --- a/src/policy/fees.cpp +++ b/src/policy/fees.cpp @@ -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; } |