Remove priority::flush and rename node::block_confirm to node::start_election#4276
Merged
clemahieu merged 3 commits intonanocurrency:developfrom Sep 5, 2023
Merged
Conversation
pwojcikdev
previously approved these changes
Sep 4, 2023
Contributor
There was a problem hiding this comment.
The change doesn't look bad, but I don't think the usage and implementation of nano::test::start_elections is correct, since it uses a release_assert(..) internally. That will just abort the whole testsuite run on the first error. The correct way would be to have nano::test::start_elections return a boolean and call it with ASSERT_TRUE(nano::test::start_elections(..)) similar to the way it was done so far.
…nano::test::start_elections which uses a nano::system to poll. This function both started an election and returned whether the block was confirmed. This is an asynchronous operation which required thread blocking. Instead, use start_elections which has polling semantics.
This is unwinding some of the blocking operations on the node class and addresses a TODO item to improve this function name.
Fixes election.construction test where election might become active/inactive before it can be polled in the test. Removes election_scheduler.flush_vacancy which only tested the flush function.
b426def to
2ce2378
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains 3 commits that: