-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change: trait IntoNodes adds two new method has_nodes() and node_ids()
`trait IntoNodes` converts types `T` such as `Vec` or `BTreeSet` into `BTreeMap<NID, Node>`. This patch changes the functionality of the `IntoNodes` trait to provide two new methods `has_nodes()` and `node_ids()`, in addition to the existing `into_nodes()` method. The `has_nodes()` method returns true if the type `T` contains any `Node` objects, and `node_ids()` returns a `Vec` of the `NodeId` objects associated with the `Node` objects in `T`. Refactor: The patch also refactors the `Membership::next_safe()` method to return an `Err(LearnerNotFound)` if it attempts to build a `Membership` object containing a `voter_id` that does not correspond to any `Node`.
- Loading branch information
1 parent
290c551
commit f591726
Showing
3 changed files
with
112 additions
and
33 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