Skip to content
Snippets Groups Projects
Commit c87a77fa authored by Hugo Trentesaux's avatar Hugo Trentesaux
Browse files

wip

parent 6f0ab434
No related branches found
No related tags found
1 merge request!280Draft: (paused) distance result precomputation
......@@ -3,13 +3,28 @@ use distance_oracle::api;
// computes distance result for all identities with status other than Revoked
// this allows to have a recent estimate of the distance computation
use clap::Parser;
#[derive(Debug, clap::Parser)]
struct Cli {
#[clap(short = 'd', long, default_value = "/tmp/duniter/chains/gdev/distance")]
evaluation_result_dir: String,
#[clap(short = 'u', long, default_value = "ws://127.0.0.1:9944")]
rpc_url: String,
/// Log level (off, error, warn, info, debug, trace)
#[clap(short = 'l', long, default_value = "info")]
log: log::LevelFilter,
}
#[tokio::main]
async fn main() {
simple_logger::SimpleLogger::new()
.with_level(cli.log)
.init()
.unwrap();
let cli = Cli::parse();
let client = &distance_oracle::api::client(cli.rpc_url.clone()).await;
let parent_hash = api::parent_hash(client).await;
......@@ -24,4 +39,5 @@ async fn main() {
let mut members_iter = api::member_iter(client, evaluation_block).await;
// TODO
unimplemented!()
}
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment