From 0787e9248a3b5cc2831bc418dea61fca9fad7971 Mon Sep 17 00:00:00 2001 From: Dmitry Balashov <43530070+0x009922@users.noreply.github.com> Date: Wed, 6 Dec 2023 13:53:39 +0700 Subject: [PATCH] [fix]: update usages of `block_store_path` Signed-off-by: Dmitry Balashov <43530070+0x009922@users.noreply.github.com> --- config/src/iroha.rs | 8 +------- core/benches/kura.rs | 2 +- core/src/kura.rs | 2 +- core/test_network/src/lib.rs | 2 +- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/config/src/iroha.rs b/config/src/iroha.rs index fd23c813365..27b6619e298 100644 --- a/config/src/iroha.rs +++ b/config/src/iroha.rs @@ -248,13 +248,7 @@ mod tests { let cfg_proxy = ConfigurationProxy::from_path(CONFIGURATION_PATH); assert_eq!( "./storage", - cfg_proxy - .kura - .unwrap() - .block_store_path - .unwrap() - .to_str() - .unwrap() + cfg_proxy.kura.unwrap().block_store_path.unwrap() ); assert_eq!( 10000, diff --git a/core/benches/kura.rs b/core/benches/kura.rs index 560f51b0e6b..279f8d97528 100644 --- a/core/benches/kura.rs +++ b/core/benches/kura.rs @@ -43,7 +43,7 @@ async fn measure_block_size_for_n_executors(n_executors: u32) { let cfg = Configuration { init_mode: iroha_config::kura::Mode::Strict, debug_output_new_blocks: false, - block_store_path: dir.path().to_path_buf(), + block_store_path: dir.path().to_str().unwrap().into(), }; let kura = iroha_core::kura::Kura::new(&cfg).unwrap(); let _thread_handle = iroha_core::kura::Kura::start(kura.clone()); diff --git a/core/src/kura.rs b/core/src/kura.rs index 62cff41c9b2..66e4fadb1a5 100644 --- a/core/src/kura.rs +++ b/core/src/kura.rs @@ -1053,7 +1053,7 @@ mod tests { let temp_dir = TempDir::new().unwrap(); Kura::new(&Configuration { init_mode: Mode::Strict, - block_store_path: temp_dir.into_path(), + block_store_path: temp_dir.path().to_str().unwrap().into(), debug_output_new_blocks: false, }) .unwrap() diff --git a/core/test_network/src/lib.rs b/core/test_network/src/lib.rs index 148555900c9..2e189b8a36c 100644 --- a/core/test_network/src/lib.rs +++ b/core/test_network/src/lib.rs @@ -414,7 +414,7 @@ impl Peer { temp_dir: Arc, ) { let mut configuration = self.get_config(configuration); - configuration.kura.block_store_path = temp_dir.path().to_path_buf(); + configuration.kura.block_store_path = temp_dir.path().to_str().unwrap().into(); let info_span = iroha_logger::info_span!( "test-peer", p2p_addr = %self.p2p_address,