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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nodes
rust
Duniter v2S
Commits
6f0ab434
Commit
6f0ab434
authored
8 months ago
by
Hugo Trentesaux
Browse files
Options
Downloads
Patches
Plain Diff
wip
parent
5628f095
No related branches found
No related tags found
1 merge request
!280
Draft: (paused) distance result precomputation
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
distance-oracle/src/bin/all.rs
+27
-0
27 additions, 0 deletions
distance-oracle/src/bin/all.rs
with
27 additions
and
0 deletions
distance-oracle/src/bin/all.rs
0 → 100644
+
27
−
0
View file @
6f0ab434
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
}
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