rustfmt generate-bags and fix typos
Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
This commit is contained in:
parent
2ad43a56ba
commit
c933ed3809
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "ghost-voter-bags"
|
name = "ghost-voter-bags"
|
||||||
version = "0.3.6"
|
version = "0.3.7"
|
||||||
description = "CLI to generate voter bags for Ghost runtimes"
|
description = "CLI to generate voter bags for Ghost runtimes"
|
||||||
license.workspace = true
|
license.workspace = true
|
||||||
authors.workspace = true
|
authors.workspace = true
|
||||||
|
@ -4,10 +4,10 @@
|
|||||||
//! again. It can be resued to generate a wholly different quantity of bags,
|
//! again. It can be resued to generate a wholly different quantity of bags,
|
||||||
//! or if the existential deposit changes, etc.
|
//! or if the existential deposit changes, etc.
|
||||||
|
|
||||||
|
use casper_runtime::Runtime as CasperRuntime;
|
||||||
use clap::{Parser, ValueEnum};
|
use clap::{Parser, ValueEnum};
|
||||||
use generate_bags::generate_thresholds;
|
use generate_bags::generate_thresholds;
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
use casper_runtime::Runtime as CasperRuntime;
|
|
||||||
|
|
||||||
#[derive(Clone, Debug, ValueEnum)]
|
#[derive(Clone, Debug, ValueEnum)]
|
||||||
#[value(rename_all = "kebab-case")]
|
#[value(rename_all = "kebab-case")]
|
||||||
@ -36,7 +36,7 @@ struct Opt {
|
|||||||
runtime: Runtime,
|
runtime: Runtime,
|
||||||
|
|
||||||
/// Where to write the output.
|
/// Where to write the output.
|
||||||
#[arg(short, long, value_name="FILE")]
|
#[arg(short, long, value_name = "FILE")]
|
||||||
output: PathBuf,
|
output: PathBuf,
|
||||||
|
|
||||||
/// The total issuance of the native currency (`value` * 10^18).
|
/// The total issuance of the native currency (`value` * 10^18).
|
||||||
@ -50,6 +50,12 @@ struct Opt {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn main() -> Result<(), std::io::Error> {
|
fn main() -> Result<(), std::io::Error> {
|
||||||
let Opt { n_bags, output, runtime, total_issuance, minimum_balance } = Opt::parse();
|
let Opt {
|
||||||
|
n_bags,
|
||||||
|
output,
|
||||||
|
runtime,
|
||||||
|
total_issuance,
|
||||||
|
minimum_balance,
|
||||||
|
} = Opt::parse();
|
||||||
runtime.generate_thresholds_fn()(n_bags, &output, total_issuance, minimum_balance)
|
runtime.generate_thresholds_fn()(n_bags, &output, total_issuance, minimum_balance)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user