-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make quorum unreachable if validator list expires (RIPD-1539) #2240
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #2240 +/- ##
===========================================
- Coverage 70.11% 70.09% -0.02%
===========================================
Files 689 689
Lines 50800 50802 +2
===========================================
- Hits 35617 35611 -6
- Misses 15183 15191 +8
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@@ -377,7 +377,8 @@ ValidatorList::onConsensusStart ( | |||
list.second.expiration <= | |||
timeKeeper_.now().time_since_epoch().count()) | |||
removePublisherList (list.first); | |||
else if (! list.second.available) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are all published lists required to have an expiration?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -395,6 +395,9 @@ ValidatorList::removePublisherList (PublicKey const& publisherKey) | |||
--iVal->second; | |||
} | |||
|
|||
iList->second.list.clear(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without this call to clear
, would that mean if a published list with keys K1,K2
expired, then was republished with key K1
, the keyListsings_
count for K2
would have been decremented twice? If so, is it worth adding a unit test to cover that case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good observation. This added test fails without the clear
3bb20f9
Great test, still 👍 on the PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
3bb20f9
to
b7aa316
Compare
Squashed and rebased on 0.80.0 |
Merged as 02059a2 |
No description provided.