diff --git a/Cargo.lock b/Cargo.lock index b02dbeecf3..4a4442d359 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5085,6 +5085,7 @@ dependencies = [ "tiny-keccak", "tokio", "tracing", + "uuid", "walkdir", "wasm-bindgen-futures", "wasmtimer", diff --git a/sn_networking/Cargo.toml b/sn_networking/Cargo.toml index 02a0bd6d65..c5cc9a820d 100644 --- a/sn_networking/Cargo.toml +++ b/sn_networking/Cargo.toml @@ -75,6 +75,7 @@ bls = { package = "blsttc", version = "8.0.1" } libp2p-identity = { version = "0.2.7", features = ["rand"] } quickcheck = "1.0.3" eyre = "0.6.8" +uuid = { version = "1.5.0", features = ["v4"] } [lints] workspace = true diff --git a/sn_networking/src/record_store.rs b/sn_networking/src/record_store.rs index 562f5265f5..88f0ca82bb 100644 --- a/sn_networking/src/record_store.rs +++ b/sn_networking/src/record_store.rs @@ -462,7 +462,7 @@ impl NodeRecordStore { }) .count(); - debug!("Relevant records len is {:?}", relevant_records_len); + debug!("Relevant records len is {relevant_records_len:?}"); relevant_records_len } @@ -945,9 +945,14 @@ mod tests { async fn get_records_within_distance_range() -> eyre::Result<()> { let max_records = 50; + let temp_dir = std::env::temp_dir(); + let unique_dir_name = uuid::Uuid::new_v4().to_string(); + let storage_dir = temp_dir.join(unique_dir_name); + // setup the store let store_config = NodeRecordStoreConfig { max_records, + storage_dir, ..Default::default() }; let self_id = PeerId::random();