-
Notifications
You must be signed in to change notification settings - Fork 330
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(nns): More strictly represent neuron visibility. (#3697)
This is done by introducing a native Visibility type, and making native Neuron use it. The most interesting difference between this native Visibility and pb::Visibility is that native Visibility has no Unspecified value. Also, got rid of Option. Without the possibility that visibility can be None, we are able to restore `#[derive(PartialEq)]` on Neuron. Thus, we ditch the custom `PartialEq` implementation. Also, made the `known_neuron_data` field NOT `pub` anymore. That way, Neuron can prevent it from becoming inconsistent with `visibility`. # References Closes [NNS1-3239]. [NNS1-3239]: https://dfinity.atlassian.net/browse/NNS1-3239
- Loading branch information
1 parent
4d98696
commit d3a3f07
Showing
12 changed files
with
239 additions
and
222 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
Oops, something went wrong.