mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-16 18:39:59 +01:00
validation: add ResetChainstates()
Necessary for the following test commit.
This commit is contained in:
@@ -5165,6 +5165,13 @@ void ChainstateManager::MaybeRebalanceCaches()
|
||||
}
|
||||
}
|
||||
|
||||
void ChainstateManager::ResetChainstates()
|
||||
{
|
||||
m_ibd_chainstate.reset();
|
||||
m_snapshot_chainstate.reset();
|
||||
m_active_chainstate = nullptr;
|
||||
}
|
||||
|
||||
ChainstateManager::~ChainstateManager()
|
||||
{
|
||||
LOCK(::cs_main);
|
||||
|
||||
@@ -1051,6 +1051,8 @@ public:
|
||||
//! snapshot that is in the process of being validated.
|
||||
bool DetectSnapshotChainstate(CTxMemPool* mempool) EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
|
||||
|
||||
void ResetChainstates() 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