Skip to content

Commit

Permalink
Move constant to top of governance file
Browse files Browse the repository at this point in the history
  • Loading branch information
max-dfinity committed Jan 8, 2025
1 parent 2d22844 commit 6804e43
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions rs/nns/governance/src/governance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit 6804e43

Please sign in to comment.