Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(nns): Fixed a bug where known neuron is not seen as public. #699

Merged

Conversation

daniel-wong-dfinity-org
Copy link
Contributor

The problem is that there are (many) paths where normalization is not applied. This is a bug from a recent change that I did.

The solution (implemented here) is to make the Neuron::visibility field private, and add a (public) getter.

This obsoletes the previous solution: fn normalized. Thus, I deleted normalized.

This bug was discovered by strengthening an existing test (for public neuron metrics), which then started failing.

…lculation. The problem is that there are paths where normalization is not applied. This is a bug from a recent change that I did. The solution is to make the Neuron::visibility field private, and add a (public) getter. This obsoletes the previous solution: normalized. Thus, I deleted normalized. This bug was discovered by strengthening an existing test (for public neuron metrics), which then started failing.
@github-actions github-actions bot added the fix label Jul 31, 2024
Copy link
Contributor Author

@daniel-wong-dfinity-org daniel-wong-dfinity-org left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some remarks that reviewers might find helpful.

rs/nns/governance/src/neuron/types.rs Show resolved Hide resolved
rs/nns/governance/src/neuron/types.rs Show resolved Hide resolved
rs/nns/governance/src/neuron/types.rs Show resolved Hide resolved
rs/nns/governance/src/neuron_store.rs Show resolved Hide resolved
@daniel-wong-dfinity-org daniel-wong-dfinity-org marked this pull request as ready for review July 31, 2024 15:22
@daniel-wong-dfinity-org daniel-wong-dfinity-org requested a review from a team as a code owner July 31, 2024 15:22
@daniel-wong-dfinity-org daniel-wong-dfinity-org added this pull request to the merge queue Aug 1, 2024
Merged via the queue into master with commit 3d0b3f1 Aug 1, 2024
25 checks passed
@daniel-wong-dfinity-org daniel-wong-dfinity-org deleted the fix-neuron-visibility-bug-daniel-wong branch August 1, 2024 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants