You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Ignore side chains and re-orgs; assuming they are random
@@ -381,25 +380,30 @@ void CBlockPolicyEstimator::processBlock(unsigned int nBlockHeight,
381
380
// transaction fees."
382
381
return;
383
382
}
384
-
nBestSeenHeight = nBlockHeight;
385
383
386
-
//Only want to be updating estimates when our blockchain is synced,
387
-
//otherwise we'll miscalculate how many blocks its taking to get included.
388
-
if (!fCurrentEstimate)
389
-
return;
384
+
//Must update nBestSeenHeight in sync with ClearCurrent so that
385
+
//calls to removeTx (via processBlockTx) correctly calculate age
386
+
// of unconfirmed txs to remove from tracking.
387
+
nBestSeenHeight = nBlockHeight;
390
388
391
-
// Clear the current block state
389
+
// Clear the current block state and update unconfirmed circular buffer
392
390
feeStats.ClearCurrent(nBlockHeight);
393
391
392
+
unsignedint countedTxs = 0;
394
393
// Repopulate the current block states
395
-
for (unsignedint i = 0; i < entries.size(); i++)
396
-
processBlockTx(nBlockHeight, entries[i]);
394
+
for (unsignedint i = 0; i < entries.size(); i++) {
395
+
if (processBlockTx(nBlockHeight, entries[i]))
396
+
countedTxs++;
397
+
}
397
398
398
399
// Update all exponential averages with the current block state
399
400
feeStats.UpdateMovingAverages();
400
401
401
-
LogPrint("estimatefee", "Blockpolicy after updating estimates for %u confirmed entries, new mempool map size %u\n",
402
-
entries.size(), mapMemPoolTxs.size());
402
+
LogPrint("estimatefee", "Blockpolicy after updating estimates for %u of %u txs in block, since last block %u of %u tracked, new mempool map size %u\n",
0 commit comments