May NOT be used after any connections are up as much of the peer-processing logic assumes a consistent block index state
| 4534 | // of the peer-processing logic assumes a consistent |
| 4535 | // block index state |
| 4536 | void UnloadBlockIndex(CTxMemPool* mempool, ChainstateManager& chainman) |
| 4537 | { |
| 4538 | LOCK(cs_main); |
| 4539 | chainman.Unload(); |
| 4540 | pindexBestHeader = nullptr; |
| 4541 | if (mempool) mempool->clear(); |
| 4542 | g_versionbitscache.Clear(); |
| 4543 | for (int b = 0; b < VERSIONBITS_NUM_BITS; b++) { |
| 4544 | warningcache[b].clear(); |
| 4545 | } |
| 4546 | fHavePruned = false; |
| 4547 | } |
| 4548 | |
| 4549 | bool ChainstateManager::LoadBlockIndex() |
| 4550 | { |