validation: add ResetChainstates()
Necessary for the following test commit.
This commit is contained in:
1 parent
3a29dfbfb2
commit
00b357c215
2 files changed
+9
No files matched your search
@@ -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