Make quorum unreachable if validator list expires (RIPD-1539)

This commit is contained in:
wilsonianb
2017-10-03 21:38:29 -05:00
committed by Brad Chase
parent 8f347a5333
commit 02059a27d6
3 changed files with 41 additions and 7 deletions

View File

@@ -239,7 +239,7 @@ ValidatorList::applyList (
(iOld != oldList.end () && *iOld < *iNew))
{
// Decrement list count for removed keys
if (keyListings_[*iOld] == 1)
if (keyListings_[*iOld] <= 1)
keyListings_.erase (*iOld);
else
--keyListings_[*iOld];
@@ -421,6 +421,9 @@ ValidatorList::removePublisherList (PublicKey const& publisherKey)
--iVal->second;
}
iList->second.list.clear();
iList->second.available = false;
return true;
}