Skip to content

Commit 4f5fdc8

Browse files
committed
move constants into the lib
1 parent 384516d commit 4f5fdc8

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

catalyst-toolbox/src/bin/cli/snapshot/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ use color_eyre::Report;
22
use fraction::Fraction;
33
use jcli_lib::utils::{output_file::OutputFile, output_format::OutputFormat};
44
use jormungandr_lib::interfaces::Value;
5-
use snapshot_lib::{voting_group::RepsVotersAssigner, RawSnapshot, Snapshot};
5+
use snapshot_lib::{
6+
voting_group::{RepsVotersAssigner, DEFAULT_DIRECT_VOTER_GROUP, DEFAULT_REPRESENTATIVE_GROUP},
7+
RawSnapshot, Snapshot,
8+
};
69
use std::fs::File;
710
use std::io::Write;
811
use std::path::PathBuf;
912
use structopt::StructOpt;
1013

11-
const DEFAULT_DIRECT_VOTER_GROUP: &str = "direct";
12-
const DEFAULT_REPRESENTATIVE_GROUP: &str = "rep";
13-
1414
/// Process raw registrations into blockchain initials
1515
#[derive(StructOpt)]
1616
#[structopt(rename_all = "kebab-case")]

snapshot-lib/src/voting_group.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ use jormungandr_lib::crypto::account::Identifier;
44
use std::collections::HashSet;
55
use thiserror::Error;
66

7+
pub const DEFAULT_DIRECT_VOTER_GROUP: &str = "direct";
8+
pub const DEFAULT_REPRESENTATIVE_GROUP: &str = "rep";
9+
710
pub trait VotingGroupAssigner {
811
fn assign(&self, vk: &Identifier) -> VotingGroup;
912
}

0 commit comments

Comments
 (0)