Skip to content

Commit

Permalink
Quick backend parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
dkijania committed Jan 15, 2021
1 parent ce4dc76 commit 90108b4
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions vitup/src/setup/quick/parameters.rs
@@ -0,0 +1,41 @@
use chrono::NaiveDateTime;

#[derive(Clone, Debug)]
pub struct QuickVitBackendParameters {
pub initials: Vec<u64>,
pub vote_start: u64,
pub vote_tally: u64,
pub tally_end: u64,
pub vote_start_timestamp: Option<NaiveDateTime>,
pub tally_start_timestamp: Option<NaiveDateTime>,
pub tally_end_timestamp: Option<NaiveDateTime>,
pub next_vote_start_time: Option<NaiveDateTime>,
pub proposals: u32,
pub slot_duration: u8,
pub slots_per_epoch: u32,
pub voting_power: u64,
pub fund_name: String,
pub private: bool,
}

impl Default for QuickVitBackendParameters {
fn default() -> Self {
let initials: Vec<u64> = std::iter::from_fn(|| Some(10_000)).take(10).collect();
Self {
initials,
vote_start: 1,
vote_tally: 2,
tally_end: 3,
proposals: 100,
slot_duration: 20,
slots_per_epoch: 30,
voting_power: 8000_000000,
vote_start_timestamp: None,
tally_start_timestamp: None,
tally_end_timestamp: None,
next_vote_start_time: None,
fund_name: "fund_3".to_owned(),
private: false,
}
}
}

0 comments on commit 90108b4

Please sign in to comment.