-
Notifications
You must be signed in to change notification settings - Fork 795
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove atomic enum election::state_m and instead require locking elec…
…tion::mutex. (#4318) * Remove atomic enum election::state_m and instead require locking election::mutex. * Fix AEC insert race condition * Move evaluation of election->confirmed () within debug_assert so it doesn't need to be evaluated when debugging is off. * Removing erasing recently_confirmed * Fix unit test rep_crawler.recently_confirmed * Remove active_transactions::insert_impl and remove the passing of mutex A mutex was needlessly being passed from function to function and a function wrapper existed needlessly. * Return early, if stopped, to remove a large level of indentation. * Break up long complex statement into 2 statements * Refactor function to remove unnecessary lock/unlocks and make it readable The critical section is now obvious and easy to see --------- Co-authored-by: Piotr Wójcik <[email protected]> Co-authored-by: Dimitrios Siganos <[email protected]>
- Loading branch information
1 parent
b6bf117
commit 978020e
Showing
7 changed files
with
115 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.