Skip to content

Commit

Permalink
chore(nns): Clarify the purpose of loading the known neuron section w…
Browse files Browse the repository at this point in the history
…hen calculating metrics (#3022)

The purpose of loading the `known_neuron_data` section isn't very
obvious. Adding a comment as well as using `..NeuronSections::NONE` for
simplification.
  • Loading branch information
jasonz-dfinity authored Dec 10, 2024
1 parent af7023c commit f1bcb14
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions rs/nns/governance/src/neuron_store/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,9 @@ impl NeuronStore {
) {
with_stable_neuron_store(|stable_neuron_store| {
let neuron_sections = NeuronSections {
hot_keys: false,
recent_ballots: false,
followees: false,
// This is needed for `Neuron::visibility``
known_neuron_data: true,
transfer: false,
..NeuronSections::NONE
};

for neuron in stable_neuron_store.range_neurons_sections(.., neuron_sections) {
Expand Down

0 comments on commit f1bcb14

Please sign in to comment.