Skip to content

Commit 4a6c6ca

Browse files
committed
refactor: better logs
1 parent 8305ddc commit 4a6c6ca

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

batcher/aligned-sdk/src/communication/messaging.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ pub async fn send_messages(
7070
sent_verification_data.push(verification_data);
7171
}
7272

73-
info!("All messages sent");
73+
info!("All proofs sent");
7474
// This vector is reversed so that while responses are received, removing from the end is cheaper.
7575
let sent_verification_data_rev: Vec<NoncedVerificationData> =
7676
sent_verification_data
@@ -120,14 +120,14 @@ pub async fn receive(
120120
process_batcher_response(&batch_inclusion_data_message, &related_verification_data)?;
121121

122122
aligned_submitted_data.push(aligned_verification_data);
123-
info!("Message response handled succesfully");
123+
debug!("Message response handled successfully");
124124

125125
if batch_inclusion_data_message.user_nonce == last_proof_nonce {
126126
break;
127127
}
128128
}
129129

130-
debug!("All message responses handled successfully");
130+
debug!("All proof responses handled successfully");
131131
Ok(aligned_submitted_data)
132132
}
133133

batcher/aligned-sdk/src/sdk.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,7 @@ pub fn save_response(
663663
batch_inclusion_data_directory_path: PathBuf,
664664
aligned_verification_data: &AlignedVerificationData,
665665
) -> Result<(), errors::FileError> {
666+
info!("Saving batch inclusion data files in folder {}", batch_inclusion_data_directory_path.display());
666667
save_response_cbor(
667668
batch_inclusion_data_directory_path.clone(),
668669
&aligned_verification_data.clone(),
@@ -689,10 +690,6 @@ fn save_response_cbor(
689690

690691
let mut file = File::create(&batch_inclusion_data_path)?;
691692
file.write_all(data.as_slice())?;
692-
info!(
693-
"Batch inclusion data written into {}",
694-
batch_inclusion_data_path.display()
695-
);
696693

697694
Ok(())
698695
}
@@ -728,11 +725,6 @@ fn save_response_json(
728725
let mut file = File::create(&batch_inclusion_data_path)?;
729726
file.write_all(serde_json::to_string_pretty(&data).unwrap().as_bytes())?;
730727

731-
info!(
732-
"Batch inclusion data written into {}",
733-
batch_inclusion_data_path.display()
734-
);
735-
736728
Ok(())
737729
}
738730

0 commit comments

Comments
 (0)