mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 14:08:40 +01:00
doc: Add and edit some comments around assumeutxo
Co-authored-by: Ryan Ofsky <ryan@ofsky.org>
This commit is contained in:
@@ -836,9 +836,10 @@ private:
|
||||
//! Once this pointer is set to a corresponding chainstate, it will not
|
||||
//! be reset until init.cpp:Shutdown().
|
||||
//!
|
||||
//! This is especially important when, e.g., calling ActivateBestChain()
|
||||
//! on all chainstates because we are not able to hold ::cs_main going into
|
||||
//! that call.
|
||||
//! It is important for the pointer to not be deleted until shutdown,
|
||||
//! because cs_main is not always held when the pointer is accessed, for
|
||||
//! example when calling ActivateBestChain, so there's no way you could
|
||||
//! prevent code from using the pointer while deleting it.
|
||||
std::unique_ptr<Chainstate> m_ibd_chainstate GUARDED_BY(::cs_main);
|
||||
|
||||
//! A chainstate initialized on the basis of a UTXO snapshot. If this is
|
||||
@@ -847,17 +848,14 @@ private:
|
||||
//! Once this pointer is set to a corresponding chainstate, it will not
|
||||
//! be reset until init.cpp:Shutdown().
|
||||
//!
|
||||
//! This is especially important when, e.g., calling ActivateBestChain()
|
||||
//! on all chainstates because we are not able to hold ::cs_main going into
|
||||
//! that call.
|
||||
//! It is important for the pointer to not be deleted until shutdown,
|
||||
//! because cs_main is not always held when the pointer is accessed, for
|
||||
//! example when calling ActivateBestChain, so there's no way you could
|
||||
//! prevent code from using the pointer while deleting it.
|
||||
std::unique_ptr<Chainstate> m_snapshot_chainstate GUARDED_BY(::cs_main);
|
||||
|
||||
//! Points to either the ibd or snapshot chainstate; indicates our
|
||||
//! most-work chain.
|
||||
//!
|
||||
//! This is especially important when, e.g., calling ActivateBestChain()
|
||||
//! on all chainstates because we are not able to hold ::cs_main going into
|
||||
//! that call.
|
||||
Chainstate* m_active_chainstate GUARDED_BY(::cs_main) {nullptr};
|
||||
|
||||
CBlockIndex* m_best_invalid GUARDED_BY(::cs_main){nullptr};
|
||||
|
||||
Reference in New Issue
Block a user