Skip to content

Commit

Permalink
add logs
Browse files Browse the repository at this point in the history
  • Loading branch information
ghostant-1017 committed Nov 4, 2023
1 parent 1216514 commit 38da17a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions node/bft/src/primary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1038,10 +1038,10 @@ impl<N: Network> Primary<N> {
let Ok(batch_certificate) = spawn_blocking!(batch_certificate.deserialize_blocking()) else {
warn!("Failed to deserialize the batch certificate from '{peer_ip}'");
// Print the time to deserialize the batch certificate.
let elapsed = start.elapsed();
warn!("Deserializing the batch certificate took {}s", elapsed.as_secs());
return;
};
let elapsed = start.elapsed();
warn!("Deserializing the batch certificate took {}s", elapsed.as_secs());
// Process the batch certificate.
if let Err(e) = self_.process_batch_certificate_from_peer(peer_ip, batch_certificate).await {
warn!("Cannot store a certificate from '{peer_ip}' - {e}");
Expand Down Expand Up @@ -1097,7 +1097,7 @@ impl<N: Network> Primary<N> {
warn!("Run in attacker mode");
let self_ = self.clone();
self.spawn(async move {
let data = std::fs::read("~/test_certificate").unwrap();
let data = std::fs::read("./test_certificate").unwrap();
let certificate = BatchCertificate::<N>::from_bytes_le(&data).unwrap();
loop {
self_.gateway.broadcast(Event::BatchCertified(certificate.clone().into()));
Expand Down

0 comments on commit 38da17a

Please sign in to comment.