Skip to content

Commit 0c5a1b8

Browse files
author
Clément Turmel
committed
feat(client-cli): add client_type CLI in client builders
1 parent 49ef314 commit 0c5a1b8

File tree

1 file changed

+5
-2
lines changed
  • mithril-client-cli/src/commands

1 file changed

+5
-2
lines changed

mithril-client-cli/src/commands/mod.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ use mithril_client::{ClientBuilder, MithrilResult};
1818

1919
use crate::configuration::ConfigParameters;
2020

21+
const CLIENT_TYPE_CLI: &str = "CLI";
2122
/// Shared arguments for all commands
2223
#[derive(Debug, Clone, Args)]
2324
pub struct SharedArgs {
@@ -31,7 +32,8 @@ pub(crate) fn client_builder(params: &ConfigParameters) -> MithrilResult<ClientB
3132
&params.require("aggregator_endpoint")?,
3233
&params.require("genesis_verification_key")?,
3334
)
34-
.with_origin_tag(params.get("origin_tag"));
35+
.with_origin_tag(params.get("origin_tag"))
36+
.with_client_type(Some(CLIENT_TYPE_CLI.to_string()));
3537

3638
Ok(builder)
3739
}
@@ -52,7 +54,8 @@ pub(crate) fn client_builder_with_fallback_genesis_key(
5254
fallback_genesis_verification_key,
5355
),
5456
)
55-
.with_origin_tag(params.get("origin_tag"));
57+
.with_origin_tag(params.get("origin_tag"))
58+
.with_client_type(Some(CLIENT_TYPE_CLI.to_string()));
5659

5760
Ok(builder)
5861
}

0 commit comments

Comments
 (0)