aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2021-10-20 13:13:44 +0800
committerfanquake <fanquake@gmail.com>2021-10-20 13:28:28 +0800
commit0ccf9b2e5594581deef2f60174c3651a57f93b64 (patch)
tree6e20dae40e31f62b77b3806dd64717039e5073ea
parenta7f28af4372a9d6ebe1c596ec455cbeac703f69d (diff)
parenta0efe529e4fd053b890450413b9ca5e1bcd8f2c2 (diff)
Merge bitcoin/bitcoin#23258: doc: Fix outdated comments referring to ::ChainActive()
a0efe529e4fd053b890450413b9ca5e1bcd8f2c2 Fix outdated comments referring to ::ChainActive() (Samuel Dobson) Pull request description: After #21866 there are a few outdated comments referring to `::ChainActive()`, which should instead refer to `ChainstateManager::ActiveChain()`. ACKs for top commit: jamesob: ACK https://github.com/bitcoin/bitcoin/pull/23258/commits/a0efe529e4fd053b890450413b9ca5e1bcd8f2c2 Tree-SHA512: 80da19c105ed29ac247e6df4c8e916c3bf3f37230b63f07302114eef9c115add673e9649f0bbe237295be0c6da7b1030b5b93e14daf6768f17ce5de7cf2c9ff2
-rw-r--r--src/index/base.cpp2
-rw-r--r--src/policy/fees.cpp2
-rw-r--r--src/txmempool.h2
-rw-r--r--src/validation.cpp2
-rw-r--r--src/validation.h2
-rw-r--r--src/wallet/wallet.cpp2
6 files changed, 6 insertions, 6 deletions
diff --git a/src/index/base.cpp b/src/index/base.cpp
index 3ca86a310e..fc6dd77a72 100644
--- a/src/index/base.cpp
+++ b/src/index/base.cpp
@@ -321,7 +321,7 @@ bool BaseIndex::BlockUntilSyncedToCurrentChain() const
{
// Skip the queue-draining stuff if we know we're caught up with
- // ::ChainActive().Tip().
+ // m_chain.Tip().
LOCK(cs_main);
const CBlockIndex* chain_tip = m_chainstate->m_chain.Tip();
const CBlockIndex* best_block_index = m_best_block_index.load();
diff --git a/src/policy/fees.cpp b/src/policy/fees.cpp
index 850b4f0439..d8c21bd833 100644
--- a/src/policy/fees.cpp
+++ b/src/policy/fees.cpp
@@ -549,7 +549,7 @@ void CBlockPolicyEstimator::processTransaction(const CTxMemPoolEntry& entry, boo
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().
+ // Ignore txs if BlockPolicyEstimator is not in sync with ActiveChain().Tip().
// It will be synced next time a block is processed.
return;
}
diff --git a/src/txmempool.h b/src/txmempool.h
index 0be51db181..460e9d0ceb 100644
--- a/src/txmempool.h
+++ b/src/txmempool.h
@@ -542,7 +542,7 @@ public:
* By design, it is guaranteed that:
*
* 1. Locking both `cs_main` and `mempool.cs` will give a view of mempool
- * that is consistent with current chain tip (`::ChainActive()` and
+ * that is consistent with current chain tip (`ActiveChain()` and
* `CoinsTip()`) and is fully populated. Fully populated means that if the
* current active chain is missing transactions that were present in a
* previously active chain, all the missing transactions will have been
diff --git a/src/validation.cpp b/src/validation.cpp
index 78559a8ee6..ff71020ebb 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -219,7 +219,7 @@ bool TestLockPointValidity(CChain& active_chain, const LockPoints* lp)
// If there are relative lock times then the maxInputBlock will be set
// If there are no relative lock times, the LockPoints don't depend on the chain
if (lp->maxInputBlock) {
- // Check whether ::ChainActive() is an extension of the block at which the LockPoints
+ // Check whether active_chain is an extension of the block at which the LockPoints
// calculation was valid. If not LockPoints are no longer valid
if (!active_chain.Contains(lp->maxInputBlock)) {
return false;
diff --git a/src/validation.h b/src/validation.h
index b10050f931..1c23b3ad5c 100644
--- a/src/validation.h
+++ b/src/validation.h
@@ -75,7 +75,7 @@ static const char* const DEFAULT_BLOCKFILTERINDEX = "0";
static const bool DEFAULT_PERSIST_MEMPOOL = true;
/** Default for -stopatheight */
static const int DEFAULT_STOPATHEIGHT = 0;
-/** Block files containing a block-height within MIN_BLOCKS_TO_KEEP of ::ChainActive().Tip() will not be pruned. */
+/** Block files containing a block-height within MIN_BLOCKS_TO_KEEP of ActiveChain().Tip() will not be pruned. */
static const unsigned int MIN_BLOCKS_TO_KEEP = 288;
static const signed int DEFAULT_CHECKBLOCKS = 6;
static const unsigned int DEFAULT_CHECKLEVEL = 3;
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 598fce0112..a749ab8897 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -1294,7 +1294,7 @@ void CWallet::updatedBlockTip()
void CWallet::BlockUntilSyncedToCurrentChain() const {
AssertLockNotHeld(cs_wallet);
// Skip the queue-draining stuff if we know we're caught up with
- // ::ChainActive().Tip(), otherwise put a callback in the validation interface queue and wait
+ // chain().Tip(), otherwise put a callback in the validation interface queue and wait
// for the queue to drain enough to execute it (indicating we are caught up
// at least with the time we entered this function).
uint256 last_block_hash = WITH_LOCK(cs_wallet, return m_last_block_processed);