-
Notifications
You must be signed in to change notification settings - Fork 804
Re-write nano::election::vote in a more readable way #4108
Copy link
Copy link
Closed
Labels
good first issueGood for newcomersGood for newcomersquality improvementsThis item indicates the need for or supplies changes that improve maintainabilityThis item indicates the need for or supplies changes that improve maintainability
Milestone
Description
Re-write the method nano::election::vote in a cleaner more readable style using guard if statements with early exits to avoid the deeply nested if blocks. Also, convert the expression
last_vote_l.timestamp < timestamp_a || (last_vote_l.timestamp == timestamp_a && last_vote_l.hash < block_hash_a)
to be more easily readable by using multiple if statements.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomersquality improvementsThis item indicates the need for or supplies changes that improve maintainabilityThis item indicates the need for or supplies changes that improve maintainability