From c2a1b94c1e118d6856f3b0911df81b654ad4c60f Mon Sep 17 00:00:00 2001 From: Lohachov Mykhailo Date: Tue, 12 Nov 2024 19:10:29 +0900 Subject: [PATCH] chore: fmt Signed-off-by: Lohachov Mykhailo --- .../tests/extra_functional/connected_peers.rs | 17 ++++++++++------- crates/iroha_test_network/src/lib.rs | 2 +- crates/iroha_wasm_builder/src/lib.rs | 7 ++----- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/crates/iroha/tests/extra_functional/connected_peers.rs b/crates/iroha/tests/extra_functional/connected_peers.rs index ecd60e6a615..ec7d7ede8ac 100644 --- a/crates/iroha/tests/extra_functional/connected_peers.rs +++ b/crates/iroha/tests/extra_functional/connected_peers.rs @@ -72,14 +72,17 @@ async fn connected_peers_with_f(faults: usize) -> Result<()> { .await?; assert_peers_status(randomized_peers.iter().copied(), 2, n_peers as u64 - 2).await; - timeout(network.sync_timeout(), - async { - loop{ - let status = removed_peer.status().await?; - if status.peers == 0 { break; } + // Wait for peer to disconnect + timeout(network.sync_timeout(), async { + loop { + let status = removed_peer.status().await?; + if status.peers == 0 { + break; } - Ok::<(), eyre::Report>(()) - }).await??; + } + Ok::<(), eyre::Report>(()) + }) + .await??; let status = removed_peer.status().await?; // Peer might have been disconnected before getting the block diff --git a/crates/iroha_test_network/src/lib.rs b/crates/iroha_test_network/src/lib.rs index 627f08e121f..eeaf6585a82 100644 --- a/crates/iroha_test_network/src/lib.rs +++ b/crates/iroha_test_network/src/lib.rs @@ -27,7 +27,7 @@ use iroha_crypto::{ExposedPrivateKey, KeyPair, PrivateKey}; use iroha_data_model::{ events::pipeline::BlockEventFilter, isi::InstructionBox, - parameter::{SumeragiParameter, SumeragiParameters, SmartContractParameter}, + parameter::{SmartContractParameter, SumeragiParameter, SumeragiParameters}, ChainId, }; use iroha_genesis::GenesisBlock; diff --git a/crates/iroha_wasm_builder/src/lib.rs b/crates/iroha_wasm_builder/src/lib.rs index 7e6ab45f677..f83c8c6d9bd 100644 --- a/crates/iroha_wasm_builder/src/lib.rs +++ b/crates/iroha_wasm_builder/src/lib.rs @@ -113,7 +113,7 @@ impl<'path, 'out_dir> Builder<'path, 'out_dir> { || -> Result<_> { Ok(Cow::Owned(Self::default_out_dir()?)) }, |out_dir| Ok(Cow::Borrowed(out_dir)), )?, - show_output: self.show_output + show_output: self.show_output, }) } @@ -226,10 +226,7 @@ mod internal { .retrieve_package_name() .wrap_err("Failed to retrieve package name")?; - let full_out_dir = self - .out_dir - .join(format!("wasm32-unknown-unknown")) - .join("release"); + let full_out_dir = self.out_dir.join("wasm32-unknown-unknown").join("release"); let wasm_file = full_out_dir.join(package_name).with_extension("wasm"); let previous_hash = if wasm_file.exists() {