Skip to content

Commit 85423cc

Browse files
committed
feat(client-cli): update client builder to async
1 parent b1f1cd4 commit 85423cc

File tree

12 files changed

+24
-12
lines changed

12 files changed

+24
-12
lines changed

mithril-client-cli/src/commands/cardano_db/download/v1.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ impl PreparedCardanoDbV1Download {
4545
)))
4646
.set_ancillary_verification_key(self.ancillary_verification_key.clone())
4747
.with_logger(context.logger().clone())
48-
.build()?;
48+
.build()
49+
.await?;
4950

5051
let get_list_of_artifact_ids = || async {
5152
let cardano_dbs = client.cardano_database().list().await.with_context(|| {

mithril-client-cli/src/commands/cardano_db/download/v2.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ impl PreparedCardanoDbV2Download {
7373
)))
7474
.set_ancillary_verification_key(self.ancillary_verification_key.clone())
7575
.with_logger(context.logger().clone())
76-
.build()?;
76+
.build()
77+
.await?;
7778

7879
let get_list_of_artifact_ids = || async {
7980
let cardano_db_snapshots = client.cardano_database_v2().list().await.with_context(

mithril-client-cli/src/commands/cardano_db/list.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ impl CardanoDbListCommand {
3030
pub async fn execute(&self, context: CommandContext) -> MithrilResult<()> {
3131
let client = client_builder_with_fallback_genesis_key(context.config_parameters())?
3232
.with_logger(context.logger().clone())
33-
.build()?;
33+
.build()
34+
.await?;
3435

3536
match self.backend {
3637
CardanoDbCommandsBackend::V1 => self.print_v1(client, context).await?,

mithril-client-cli/src/commands/cardano_db/show.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ impl CardanoDbShowCommand {
2929
pub async fn execute(&self, context: CommandContext) -> MithrilResult<()> {
3030
let client = client_builder_with_fallback_genesis_key(context.config_parameters())?
3131
.with_logger(context.logger().clone())
32-
.build()?;
32+
.build()
33+
.await?;
3334

3435
match self.backend {
3536
CardanoDbCommandsBackend::V1 => self.print_v1(client, &context).await?,

mithril-client-cli/src/commands/cardano_db/verify.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ impl CardanoDbVerifyCommand {
9494
context.logger().clone(),
9595
)))
9696
.with_logger(context.logger().clone())
97-
.build()?;
97+
.build()
98+
.await?;
9899

99100
client.cardano_database_v2().check_has_immutables(db_dir)?;
100101

mithril-client-cli/src/commands/cardano_stake_distribution/download.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ impl CardanoStakeDistributionDownloadCommand {
5555
logger.clone(),
5656
)))
5757
.with_logger(logger.clone())
58-
.build()?;
58+
.build()
59+
.await?;
5960

6061
progress_printer.report_step(
6162
1,

mithril-client-cli/src/commands/cardano_stake_distribution/list.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ impl CardanoStakeDistributionListCommand {
1313
pub async fn execute(&self, context: CommandContext) -> MithrilResult<()> {
1414
let client = client_builder_with_fallback_genesis_key(context.config_parameters())?
1515
.with_logger(context.logger().clone())
16-
.build()?;
16+
.build()
17+
.await?;
1718
let lines = client.cardano_stake_distribution().list().await?;
1819

1920
if context.is_json_output_enabled() {

mithril-client-cli/src/commands/cardano_transaction/certify.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ impl CardanoTransactionsCertifyCommand {
4646
logger.clone(),
4747
)))
4848
.with_logger(logger.clone())
49-
.build()?;
49+
.build()
50+
.await?;
5051

5152
progress_printer.report_step(1, "Fetching a proof for the given transactions…")?;
5253
let cardano_transaction_proof = client

mithril-client-cli/src/commands/cardano_transaction/snapshot_list.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ impl CardanoTransactionSnapshotListCommand {
1515
pub async fn execute(&self, context: CommandContext) -> MithrilResult<()> {
1616
let client = client_builder_with_fallback_genesis_key(context.config_parameters())?
1717
.with_logger(context.logger().clone())
18-
.build()?;
18+
.build()
19+
.await?;
1920
let lines = client.cardano_transaction().list_snapshots().await?;
2021

2122
if context.is_json_output_enabled() {

mithril-client-cli/src/commands/cardano_transaction/snapshot_show.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ impl CardanoTransactionsSnapshotShowCommand {
1919
pub async fn execute(&self, context: CommandContext) -> MithrilResult<()> {
2020
let client = client_builder_with_fallback_genesis_key(context.config_parameters())?
2121
.with_logger(context.logger().clone())
22-
.build()?;
22+
.build()
23+
.await?;
2324

2425
let get_list_of_artifact_ids = || async {
2526
let transactions_sets = client.cardano_transaction().list_snapshots().await.with_context(|| {

0 commit comments

Comments
 (0)