MCPcopy Create free account
hub / github.com/ElementsProject/elements / Unload

Method Unload

src/validation.cpp:5510–5521  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5508}
5509
5510void ChainstateManager::Unload()
5511{
5512 AssertLockHeld(::cs_main);
5513 for (CChainState* chainstate : this->GetAll()) {
5514 chainstate->m_chain.SetTip(nullptr);
5515 chainstate->UnloadBlockIndex();
5516 }
5517
5518 m_failed_blocks.clear();
5519 m_blockman.Unload();
5520 m_best_invalid = nullptr;
5521}
5522
5523void ChainstateManager::Reset()
5524{

Callers 1

UnloadBlockIndexFunction · 0.45

Calls 4

GetAllMethod · 0.95
SetTipMethod · 0.80
UnloadBlockIndexMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected