From 6804e43075c9a98ac785eef0bf2afc49a22608d4 Mon Sep 17 00:00:00 2001 From: Max Summe Date: Tue, 7 Jan 2025 16:47:14 -0800 Subject: [PATCH] Move constant to top of governance file --- rs/nns/governance/src/governance.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rs/nns/governance/src/governance.rs b/rs/nns/governance/src/governance.rs index 68ab40927209..ab2a9d79b9a7 100644 --- a/rs/nns/governance/src/governance.rs +++ b/rs/nns/governance/src/governance.rs @@ -210,6 +210,9 @@ pub const MAX_NEURON_CREATION_SPIKE: u64 = MAX_SUSTAINED_NEURONS_PER_HOUR * 8; /// The maximum number results returned by the method `list_proposals`. pub const MAX_LIST_PROPOSAL_RESULTS: u32 = 100; +/// The maximum number of neurons returned by `list_neurons` +const MAX_LIST_NEURONS_COUNT: usize = 500; + const MAX_LIST_NODE_PROVIDER_REWARDS_RESULTS: usize = 24; /// The number of e8s per ICP; @@ -2465,8 +2468,6 @@ impl Governance { let mut neuron_infos = hashmap![]; let mut full_neurons = vec![]; - const MAX_LIST_NEURONS_COUNT: usize = 500; - let mut next_start_from_neuron_id = None; // Populate the above two neuron collections. for (count, neuron_id) in &mut requested_neuron_ids.into_iter().enumerate() {