Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Duniter v2S
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nodes
rust
Duniter v2S
Commits
c87a77fa
Commit
c87a77fa
authored
8 months ago
by
Hugo Trentesaux
Browse files
Options
Downloads
Patches
Plain Diff
wip
parent
6f0ab434
No related branches found
No related tags found
1 merge request
!280
Draft: (paused) distance result precomputation
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
distance-oracle/src/bin/all.rs
+17
-1
17 additions, 1 deletion
distance-oracle/src/bin/all.rs
resources/metadata.scale
+0
-0
0 additions, 0 deletions
resources/metadata.scale
with
17 additions
and
1 deletion
distance-oracle/src/bin/all.rs
+
17
−
1
View file @
c87a77fa
...
...
@@ -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!
()
}
This diff is collapsed.
Click to expand it.
resources/metadata.scale
+
0
−
0
View file @
c87a77fa
No preview for this file type
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment