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
7d19364a
Unverified
Commit
7d19364a
authored
7 months ago
by
bgallois
Browse files
Options
Downloads
Patches
Plain Diff
add log for distance oracle in main binary
parent
b0e55330
No related branches found
No related tags found
1 merge request
!290
Fix #262 distance oracle pool index
Pipeline
#38908
passed
7 months ago
Stage: labels
Stage: quality
Stage: build
Stage: tests
Stage: deploy
Changes
2
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
node/src/cli.rs
+5
-3
5 additions, 3 deletions
node/src/cli.rs
node/src/command.rs
+3
-0
3 additions, 0 deletions
node/src/command.rs
with
8 additions
and
3 deletions
node/src/cli.rs
+
5
−
3
View file @
7d19364a
...
@@ -132,14 +132,16 @@ pub struct Completion {
...
@@ -132,14 +132,16 @@ pub struct Completion {
#[cfg(feature
=
"distance-oracle"
)]
#[cfg(feature
=
"distance-oracle"
)]
#[derive(Debug,
clap::Parser)]
#[derive(Debug,
clap::Parser)]
pub
struct
DistanceOracle
{
pub
struct
DistanceOracle
{
/// Saving path.
#[clap(short
=
'd'
,
long,
default_value
=
"/tmp/duniter/chains/gdev/distance"
)]
#[clap(short
=
'd'
,
long,
default_value
=
"/tmp/duniter/chains/gdev/distance"
)]
pub
evaluation_result_dir
:
String
,
pub
evaluation_result_dir
:
String
,
/// Number of seconds between two evaluations (oneshot if absent)
/// Number of seconds between two evaluations (oneshot if absent)
.
#[clap(short
=
'i'
,
long)]
#[clap(short
=
'i'
,
long)]
pub
interval
:
Option
<
u64
>
,
pub
interval
:
Option
<
u64
>
,
/// Node used for fetching state
/// Node used for fetching state
.
#[clap(short
=
'u'
,
long,
default_value
=
"ws://127.0.0.1:9944"
)]
#[clap(short
=
'u'
,
long,
default_value
=
"ws://127.0.0.1:9944"
)]
pub
rpc_url
:
String
,
pub
rpc_url
:
String
,
/// Sets the logging level (e.g., debug, error, info, trace, warn).
#[clap(short
=
'l'
,
long,
default_value
=
"info"
)]
#[clap(short
=
'l'
,
long,
default_value
=
"info"
)]
log
:
log
:
:
LevelFilter
,
pub
log
:
String
,
}
}
This diff is collapsed.
Click to expand it.
node/src/command.rs
+
3
−
0
View file @
7d19364a
...
@@ -285,6 +285,9 @@ pub fn run() -> sc_cli::Result<()> {
...
@@ -285,6 +285,9 @@ pub fn run() -> sc_cli::Result<()> {
}
}
#[cfg(feature
=
"distance-oracle"
)]
#[cfg(feature
=
"distance-oracle"
)]
Some
(
Subcommand
::
DistanceOracle
(
cmd
))
=>
sc_cli
::
build_runtime
()
?
.block_on
(
async
move
{
Some
(
Subcommand
::
DistanceOracle
(
cmd
))
=>
sc_cli
::
build_runtime
()
?
.block_on
(
async
move
{
let
mut
builder
=
sc_cli
::
LoggerBuilder
::
new
(
""
);
builder
.with_profiling
(
sc_cli
::
TracingReceiver
::
Log
.into
(),
cmd
.log
.clone
());
builder
.init
()
?
;
let
client
=
distance_oracle
::
api
::
client
(
&
cmd
.rpc_url
)
.await
;
let
client
=
distance_oracle
::
api
::
client
(
&
cmd
.rpc_url
)
.await
;
let
settings
=
distance_oracle
::
Settings
{
let
settings
=
distance_oracle
::
Settings
{
...
...
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