Skip to content

Commit 78ae62d

Browse files
committed
Add clarifying comments to fee estimation
1 parent 5fe0f47 commit 78ae62d

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/policy/fees.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,11 @@ void TxConfirmStats::removeTx(unsigned int entryHeight, unsigned int nBestSeenHe
281281
}
282282
}
283283

284+
// This function is called from CTxMemPool::removeUnchecked to ensure
285+
// txs removed from the mempool for any reason are no longer
286+
// tracked. Txs that were part of a block have already been removed in
287+
// processBlockTx to ensure they are never double tracked, but it is
288+
// of no harm to try to remove them again.
284289
bool CBlockPolicyEstimator::removeTx(uint256 hash)
285290
{
286291
std::map<uint256, TxStatsInfo>::iterator pos = mapMemPoolTxs.find(hash);

src/validation.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ static const int64_t BLOCK_DOWNLOAD_TIMEOUT_PER_PEER = 500000;
130130
static const unsigned int DEFAULT_LIMITFREERELAY = 0;
131131
static const bool DEFAULT_RELAYPRIORITY = true;
132132
static const int64_t DEFAULT_MAX_TIP_AGE = 24 * 60 * 60;
133-
/** Maximum age of our tip for us to be considered current for fee estimation */
133+
/** Maximum age of our tip in seconds for us to be considered current for fee estimation */
134134
static const int64_t MAX_FEE_ESTIMATION_TIP_AGE = 3 * 60 * 60;
135135

136136
/** Default for -permitbaremultisig */

0 commit comments

Comments
 (0)