Skip to content

Commit

Permalink
Erase mnListCache entry on UndoBlock (#2254)
Browse files Browse the repository at this point in the history
  • Loading branch information
UdjinM6 authored Sep 3, 2018
1 parent 88e7888 commit a5e65aa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/evo/deterministicmns.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,9 +328,11 @@ bool CDeterministicMNManager::UndoBlock(const CBlock& block, const CBlockIndex*
LOCK(cs);

int nHeight = pindex->nHeight;
uint256 blockHash = block.GetHash();

evoDb.Erase(std::make_pair(DB_LIST_DIFF, block.GetHash()));
evoDb.Erase(std::make_pair(DB_LIST_SNAPSHOT, block.GetHash()));
evoDb.Erase(std::make_pair(DB_LIST_DIFF, blockHash));
evoDb.Erase(std::make_pair(DB_LIST_SNAPSHOT, blockHash));
mnListsCache.erase(blockHash);

if (nHeight == GetSpork15Value()) {
LogPrintf("CDeterministicMNManager::%s -- spork15 is not active anymore. nHeight=%d\n", __func__, nHeight);
Expand Down

0 comments on commit a5e65aa

Please sign in to comment.