diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index 14c2e55821..6e7a7e117e 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -130,11 +130,11 @@ jobs: - name: Run network tests (with encrypt-records) timeout-minutes: 25 - run: cargo test --release --package sn_networking --features="open-metrics, encrypt-records" + run: cargo test --release --package sn_networking --features="open-metrics, encrypt-records" can_store_after_restart - name: Run network tests (without encrypt-records) timeout-minutes: 25 - run: cargo test --release --package sn_networking --features="open-metrics" + run: cargo test --release --package sn_networking --features="open-metrics" can_store_after_restart - name: Run protocol tests timeout-minutes: 25 diff --git a/sn_networking/src/record_store.rs b/sn_networking/src/record_store.rs index 7e50fdbc4c..c6dd99cc53 100644 --- a/sn_networking/src/record_store.rs +++ b/sn_networking/src/record_store.rs @@ -227,18 +227,18 @@ impl NodeRecordStore { let process_entry = |entry: &DirEntry| -> _ { let path = entry.path(); if path.is_file() { - debug!("Existing record found: {path:?}"); + println!("Existing record found: {path:?}"); // if we've got a file, lets try and read it let filename = match path.file_name().and_then(|n| n.to_str()) { Some(file_name) => file_name, None => { // warn and remove this file as it's not a valid record - warn!( + println!( "Found a file in the storage dir that is not a valid record: {:?}", path ); if let Err(e) = fs::remove_file(path) { - warn!( + println!( "Failed to remove invalid record file from storage dir: {:?}", e ); @@ -258,9 +258,9 @@ impl NodeRecordStore { } else { // This will be due to node restart, result in different encrypt_detail. // Hence need to clean up the old copy. - info!("Failed to decrypt record from file {filename:?}, clean it up."); + println!("Failed to decrypt record from file {filename:?}, clean it up."); if let Err(e) = fs::remove_file(path) { - warn!( + println!( "Failed to remove outdated record file {filename:?} from storage dir: {:?}", e ); @@ -269,7 +269,7 @@ impl NodeRecordStore { } } Err(err) => { - error!("Error while reading file. filename: {filename}, error: {err:?}"); + println!("Error while reading file. filename: {filename}, error: {err:?}"); return None; } }; @@ -281,14 +281,14 @@ impl NodeRecordStore { RecordType::NonChunk(xorname_hash) } Err(error) => { - warn!( + println!( "Failed to parse record type of record {filename:?}: {:?}", error ); // In correct decryption using different key could result in this. // In that case, a cleanup shall be carried out. if let Err(e) = fs::remove_file(path) { - warn!( + println!( "Failed to remove invalid record file {filename:?} from storage dir: {:?}", e ); @@ -298,13 +298,13 @@ impl NodeRecordStore { }; let address = NetworkAddress::from_record_key(&key); - info!("Existing record loaded: {path:?}"); + println!("Existing record loaded: {path:?}"); return Some((key, (address, record_type))); } None }; - info!("Attempting to repopulate records from existing store..."); + println!("Attempting to repopulate records from existing store..."); let records = WalkDir::new(&config.storage_dir) .into_iter() .filter_map(|e| e.ok()) @@ -354,7 +354,7 @@ impl NodeRecordStore { network_event_sender: mpsc::Sender, swarm_cmd_sender: mpsc::Sender, ) -> Self { - info!("Using encryption_seed of {:?}", config.encryption_seed); + println!("Using encryption_seed of {:?}", config.encryption_seed); let encryption_details = derive_aes256gcm_siv_from_seed(&config.encryption_seed); // Recover the quoting_metrics first, as the historical file will be cleaned by @@ -667,7 +667,7 @@ impl NodeRecordStore { pub(crate) fn put_verified(&mut self, r: Record, record_type: RecordType) -> Result<()> { let key = &r.key; let record_key = PrettyPrintRecordKey::from(&r.key).into_owned(); - debug!("PUTting a verified Record: {record_key:?}"); + println!("PUTting a verified Record: {record_key:?}"); // if cache already has the record : // * if with same content, do nothing and return early @@ -706,12 +706,12 @@ impl NodeRecordStore { let cmd = match fs::write(&file_path, bytes) { Ok(_) => { // vdash metric (if modified please notify at https://github.com/happybeing/vdash/issues): - info!("Wrote record {record_key2:?} to disk! filename: {filename}"); + println!("Wrote record {record_key2:?} to disk! filename: {filename}"); LocalSwarmCmd::AddLocalRecordAsStored { key, record_type } } Err(err) => { - error!( + println!( "Error writing record {record_key2:?} filename: {filename}, error: {err:?}" ); LocalSwarmCmd::RemoveFailedLocalRecord { key }