mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-24 10:17:45 -03:00
Merge bitcoin/bitcoin#29624: doc: update NeedsRedownload() and nStatus comment
Some checks are pending
Some checks are pending
af9f987893
doc: update NeedsRedownload() comment (Sjors Provoost) Pull request description: Noticed two outdated comments while reviewing #29370. Since #21009 we no longer roll back the chain, when a user updates a pre-segwit node to a modern node. In this unlikely scenario we tell the user to `-reindex`. This PR updates a comment in `PopulateAndValidateSnapshot` to reflect that change. Ditto for the description of `nStatus` in `chain.h`. ACKs for top commit: maflcko: re-ACKaf9f987893
fjahr: ACKaf9f987893
Tree-SHA512: d590f1cff6823297764c863753ed5478b8933d503c43933902d50b449dfd852a02aeb318c072ad25d02e4c2583d7026cd176a10b0584292d6bbe381a063f5c45
This commit is contained in:
commit
6fc4692797
2 changed files with 2 additions and 2 deletions
|
@ -178,7 +178,7 @@ public:
|
|||
//! Verification status of this block. See enum BlockStatus
|
||||
//!
|
||||
//! Note: this value is modified to show BLOCK_OPT_WITNESS during UTXO snapshot
|
||||
//! load to avoid the block index being spuriously rewound.
|
||||
//! load to avoid a spurious startup failure requiring -reindex.
|
||||
//! @sa NeedsRedownload
|
||||
//! @sa ActivateSnapshot
|
||||
uint32_t nStatus GUARDED_BY(::cs_main){0};
|
||||
|
|
|
@ -6014,7 +6014,7 @@ util::Result<void> ChainstateManager::PopulateAndValidateSnapshot(
|
|||
index = snapshot_chainstate.m_chain[i];
|
||||
|
||||
// Fake BLOCK_OPT_WITNESS so that Chainstate::NeedsRedownload()
|
||||
// won't ask to rewind the entire assumed-valid chain on startup.
|
||||
// won't ask for -reindex on startup.
|
||||
if (DeploymentActiveAt(*index, *this, Consensus::DEPLOYMENT_SEGWIT)) {
|
||||
index->nStatus |= BLOCK_OPT_WITNESS;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue