Skip to content

Conversation

@foriequal0
Copy link
Contributor

Close: #1778

@kseo kseo changed the title Block to attempt to double vote Block double vote attemptions Sep 26, 2019
@remagpie remagpie changed the title Block double vote attemptions Block double vote attempts Sep 26, 2019
@foriequal0 foriequal0 force-pushed the fix/block-attempt-to-double-vote branch 2 times, most recently from ab7ccd5 to a934ba9 Compare September 26, 2019 10:35
majecty
majecty previously approved these changes Sep 26, 2019
remagpie
remagpie previously approved these changes Sep 26, 2019
VoteCollector is changed to return Result<bool, DoubleVote>. Rust
compiler will force you to check whether there was a double vote.
@foriequal0 foriequal0 force-pushed the fix/block-attempt-to-double-vote branch from b654d1e to 27cd4c5 Compare September 29, 2019 16:38
@foriequal0
Copy link
Contributor Author

I'll remove @majecty from the reviewers since he is vacant. @HoOngEe Would you review this?
Here are the review points:

  • "Cleanup vote functions" is a refactoring. You should carefully review whether I've changed the behavior accidentally.
  • "Fix to use Err(DoubleVote) from VoteCollector" is adding missing assertions. It should not change the behavior unless the node tries to double vote. In that case, the node should crash immediately since there's no way to recover from the error.
  • Other commits: They have straightforward names and tests. I think checking styles and consistencies would be enough.

@foriequal0 foriequal0 removed the request for review from majecty September 30, 2019 02:55
@HoOngEe
Copy link
Contributor

HoOngEe commented Sep 30, 2019

Thank you for the summary, I started reviewing.

Copy link
Contributor

@HoOngEe HoOngEe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@foriequal0
Copy link
Contributor Author

CI passed. I'll merge it manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prevent further double vote incidents

4 participants