Skip to content

Commit 6f06b26

Browse files
committed
rename bool to validFeeEstimate
1 parent 84f7ab0 commit 6f06b26

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

src/policy/fees.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ CBlockPolicyEstimator::CBlockPolicyEstimator(const CFeeRate& _minRelayFee)
306306
feeStats.Initialize(vfeelist, MAX_BLOCK_CONFIRMS, DEFAULT_DECAY);
307307
}
308308

309-
void CBlockPolicyEstimator::processTransaction(const CTxMemPoolEntry& entry, bool fCurrentEstimate)
309+
void CBlockPolicyEstimator::processTransaction(const CTxMemPoolEntry& entry, bool validFeeEstimate)
310310
{
311311
unsigned int txHeight = entry.GetHeight();
312312
uint256 hash = entry.GetTx().GetHash();
@@ -324,7 +324,7 @@ void CBlockPolicyEstimator::processTransaction(const CTxMemPoolEntry& entry, boo
324324

325325
// Only want to be updating estimates when our blockchain is synced,
326326
// otherwise we'll miscalculate how many blocks its taking to get included.
327-
if (!fCurrentEstimate)
327+
if (!validFeeEstimate)
328328
return;
329329

330330
// Feerates are stored and reported as BTC-per-kb:

src/policy/fees.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ class CBlockPolicyEstimator
209209
void processBlockTx(unsigned int nBlockHeight, const CTxMemPoolEntry& entry);
210210

211211
/** Process a transaction accepted to the mempool*/
212-
void processTransaction(const CTxMemPoolEntry& entry, bool fCurrentEstimate);
212+
void processTransaction(const CTxMemPoolEntry& entry, bool validFeeEstimate);
213213

214214
/** Remove a transaction from the mempool tracking stats*/
215215
bool removeTx(uint256 hash);

src/txmempool.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ void CTxMemPool::AddTransactionsUpdated(unsigned int n)
392392
nTransactionsUpdated += n;
393393
}
394394

395-
bool CTxMemPool::addUnchecked(const uint256& hash, const CTxMemPoolEntry &entry, setEntries &setAncestors, bool fCurrentEstimate)
395+
bool CTxMemPool::addUnchecked(const uint256& hash, const CTxMemPoolEntry &entry, setEntries &setAncestors, bool validFeeEstimate)
396396
{
397397
// Add to memory pool without checking anything.
398398
// Used by main.cpp AcceptToMemoryPool(), which DOES do
@@ -442,7 +442,7 @@ bool CTxMemPool::addUnchecked(const uint256& hash, const CTxMemPoolEntry &entry,
442442

443443
nTransactionsUpdated++;
444444
totalTxSize += entry.GetTxSize();
445-
minerPolicyEstimator->processTransaction(entry, fCurrentEstimate);
445+
minerPolicyEstimator->processTransaction(entry, validFeeEstimate);
446446

447447
vTxHashes.emplace_back(tx.GetWitnessHash(), newit);
448448
newit->vTxHashesIdx = vTxHashes.size() - 1;
@@ -1015,14 +1015,14 @@ int CTxMemPool::Expire(int64_t time) {
10151015
return stage.size();
10161016
}
10171017

1018-
bool CTxMemPool::addUnchecked(const uint256&hash, const CTxMemPoolEntry &entry, bool fCurrentEstimate)
1018+
bool CTxMemPool::addUnchecked(const uint256&hash, const CTxMemPoolEntry &entry, bool validFeeEstimate)
10191019
{
10201020
LOCK(cs);
10211021
setEntries setAncestors;
10221022
uint64_t nNoLimit = std::numeric_limits<uint64_t>::max();
10231023
std::string dummy;
10241024
CalculateMemPoolAncestors(entry, setAncestors, nNoLimit, nNoLimit, nNoLimit, nNoLimit, dummy);
1025-
return addUnchecked(hash, entry, setAncestors, fCurrentEstimate);
1025+
return addUnchecked(hash, entry, setAncestors, validFeeEstimate);
10261026
}
10271027

10281028
void CTxMemPool::UpdateChild(txiter entry, txiter child, bool add)

src/txmempool.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -523,8 +523,8 @@ class CTxMemPool
523523
// to track size/count of descendant transactions. First version of
524524
// addUnchecked can be used to have it call CalculateMemPoolAncestors(), and
525525
// then invoke the second version.
526-
bool addUnchecked(const uint256& hash, const CTxMemPoolEntry &entry, bool fCurrentEstimate = true);
527-
bool addUnchecked(const uint256& hash, const CTxMemPoolEntry &entry, setEntries &setAncestors, bool fCurrentEstimate = true);
526+
bool addUnchecked(const uint256& hash, const CTxMemPoolEntry &entry, bool validFeeEstimate = true);
527+
bool addUnchecked(const uint256& hash, const CTxMemPoolEntry &entry, setEntries &setAncestors, bool validFeeEstimate = true);
528528

529529
void removeRecursive(const CTransaction &tx);
530530
void removeForReorg(const CCoinsViewCache *pcoins, unsigned int nMemPoolHeight, int flags);

0 commit comments

Comments
 (0)