Skip to content

Commit 44b64b9

Browse files
committed
Fix edge case with stale fee estimates
1 parent 78ae62d commit 44b64b9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/policy/fees.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,9 +321,11 @@ void CBlockPolicyEstimator::processTransaction(const CTxMemPoolEntry& entry, boo
321321
return;
322322
}
323323

324-
if (txHeight < nBestSeenHeight) {
324+
if (txHeight != nBestSeenHeight) {
325325
// Ignore side chains and re-orgs; assuming they are random they don't
326326
// affect the estimate. We'll potentially double count transactions in 1-block reorgs.
327+
// Ignore txs if BlockPolicyEstimator is not in sync with chainActive.Tip().
328+
// It will be synced next time a block is processed.
327329
return;
328330
}
329331

0 commit comments

Comments
 (0)