Skip to content

Commit

Permalink
Also call NotifyMasternodeListChanged when MNs have been updated
Browse files Browse the repository at this point in the history
And not only when added/removed.
  • Loading branch information
codablock committed Apr 9, 2019
1 parent db781b3 commit fa90c02
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/evo/deterministicmns.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ bool CDeterministicMNManager::ProcessBlock(const CBlock& block, const CBlockInde
}

// Don't hold cs while calling signals
if (!diff.addedMNs.empty() || !diff.removedMns.empty()) {
if (diff.HasChanges()) {
GetMainSignals().NotifyMasternodeListChanged(false, oldList, diff);
}

Expand Down Expand Up @@ -541,7 +541,7 @@ bool CDeterministicMNManager::UndoBlock(const CBlock& block, const CBlockIndex*
mnListsCache.erase(blockHash);
}

if (!diff.addedMNs.empty() || !diff.removedMns.empty()) {
if (diff.HasChanges()) {
auto inversedDiff = curList.BuildDiff(prevList);
GetMainSignals().NotifyMasternodeListChanged(true, curList, inversedDiff);
}
Expand Down

0 comments on commit fa90c02

Please sign in to comment.