-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add more validations on QC's votes #475
Conversation
Note:start |
libraries/chain/finality/qc.cpp
Outdated
pending_vote_index); | ||
} | ||
|
||
// returns true if ithe other and I vote iin the same way on my_vote_index |
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.
// returns true if ithe other and I vote iin the same way on my_vote_index | |
// returns true iff the other and I voted the same way |
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.
Thanks.
libraries/chain/finality/qc.cpp
Outdated
for (size_t i=0; i<strong_votes->size(); ++i) { | ||
// at most one is true | ||
EOS_ASSERT( !((*strong_votes)[i] && (*weak_votes)[i]), invalid_qc_claim, | ||
"finalizer (bit index ${i}) votes both strong and weak", |
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.
"finalizer (bit index ${i}) votes both strong and weak", | |
"finalizer (bit index ${i}) voted both strong and weak", |
libraries/chain/finality/qc.cpp
Outdated
// We have already verified the same index is not voted on both strong | ||
// and weak for a given qc_sig_t (I or other). |
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.
// We have already verified the same index is not voted on both strong | |
// and weak for a given qc_sig_t (I or other). | |
// We have already verified the same index has not voted both strong | |
// and weak for a given qc_sig_t (I or other). |
Add more validations on QC's votes:
Resolves #467