Skip to content

Commit

Permalink
Merge pull request #2226 from eqlabs/krisztian/p2p
Browse files Browse the repository at this point in the history
chore(p2p): change/add some logs
  • Loading branch information
kkovaacs committed Sep 6, 2024
2 parents ec8c0f4 + 6fcf288 commit 310916b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
2 changes: 2 additions & 0 deletions crates/p2p/src/main_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@ impl MainLoop {
}

async fn handle_event(&mut self, event: SwarmEvent<behaviour::Event>) {
tracing::trace!(?event, "Handling swarm event");

match event {
// ===========================
// Connection management
Expand Down
5 changes: 1 addition & 4 deletions crates/pathfinder/src/sync/checkpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -327,10 +327,7 @@ async fn handle_transaction_stream(
.pipe(transactions::VerifyCommitment, 10)
.pipe(transactions::Store::new(storage.connection()?, start), 10)
.into_stream()
.inspect_ok(|x| {
tracing::info!(tail=%x.data, "Transactions chunk
synced")
})
.inspect_ok(|x| tracing::info!(tail=%x.data, "Transactions chunk synced"))
.try_fold((), |_, _| std::future::ready(Ok(())))
.await
.map_err(SyncError::from_v2)?;
Expand Down
6 changes: 2 additions & 4 deletions crates/pathfinder/src/sync/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,8 @@ impl<T: Send + 'static> SyncReceiver<T> {
let elements_per_sec = count as f32 / t.elapsed().as_secs_f32();
let queue_fullness = queue_capacity - self.inner.capacity();
let input_queue = Fullness(queue_fullness, queue_capacity);
tracing::debug!(
"Stage: {}, queue: {}, {elements_per_sec:.0} items/s",
S::NAME,
input_queue
tracing::trace!(stage=%S::NAME, %input_queue, %elements_per_sec,
"Stage metrics"
);

output
Expand Down

0 comments on commit 310916b

Please sign in to comment.