From 6f0ab4344188022b9b18aceb5fb79cc1d7997be6 Mon Sep 17 00:00:00 2001 From: Hugo Trentesaux <hugo@trentesaux.fr> Date: Fri, 20 Sep 2024 16:34:46 +0200 Subject: [PATCH] wip --- distance-oracle/src/bin/all.rs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 distance-oracle/src/bin/all.rs diff --git a/distance-oracle/src/bin/all.rs b/distance-oracle/src/bin/all.rs new file mode 100644 index 000000000..3fb80ae0f --- /dev/null +++ b/distance-oracle/src/bin/all.rs @@ -0,0 +1,27 @@ +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 + +#[tokio::main] +async fn main() { + + simple_logger::SimpleLogger::new() + .init() + .unwrap(); + + let client = &distance_oracle::api::client(cli.rpc_url.clone()).await; + + let parent_hash = api::parent_hash(client).await; + + let max_depth = api::max_referee_distance(client).await; + + let current_pool_index = api::current_pool_index(client, parent_hash).await; + + let evaluation_block = parent_hash; + + let mut certs_iter = api::cert_iter(client, evaluation_block).await; + let mut members_iter = api::member_iter(client, evaluation_block).await; + + // TODO +} -- GitLab