mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 14:08:40 +01:00
assumeutxo: remove snapshot during -reindex{-chainstate}
Removing a snapshot chainstate from disk (and memory) is consistent with existing reindex operations.
This commit is contained in:
@@ -848,9 +848,6 @@ private:
|
||||
//! Points to either the ibd or snapshot chainstate; indicates our
|
||||
//! most-work chain.
|
||||
//!
|
||||
//! 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.
|
||||
@@ -1203,6 +1200,10 @@ public:
|
||||
|
||||
void ResetChainstates() EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
|
||||
|
||||
//! Remove the snapshot-based chainstate and all on-disk artifacts.
|
||||
//! Used when reindex{-chainstate} is called during snapshot use.
|
||||
[[nodiscard]] bool DeleteSnapshotChainstate() EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
|
||||
|
||||
//! Switch the active chainstate to one based on a UTXO snapshot that was loaded
|
||||
//! previously.
|
||||
Chainstate& ActivateExistingSnapshot(CTxMemPool* mempool, uint256 base_blockhash)
|
||||
|
||||
Reference in New Issue
Block a user