Pass mempool pointer to UnloadBlockIndex

This commit is contained in:
MarcoFalke
2020-07-19 20:30:18 +02:00
parent faec851b6e
commit fac674db20
5 changed files with 6 additions and 6 deletions

View File

@@ -4587,13 +4587,13 @@ void CChainState::UnloadBlockIndex() {
// May NOT be used after any connections are up as much
// of the peer-processing logic assumes a consistent
// block index state
void UnloadBlockIndex()
void UnloadBlockIndex(CTxMemPool* mempool)
{
LOCK(cs_main);
g_chainman.Unload();
pindexBestInvalid = nullptr;
pindexBestHeader = nullptr;
mempool.clear();
if (mempool) mempool->clear();
vinfoBlockFile.clear();
nLastBlockFile = 0;
setDirtyBlockIndex.clear();