Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
denisu committed Nov 6, 2024
1 parent 1d165c2 commit 22c6b4b
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions src/peer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,6 @@ impl PeerProcessor {
sender.clone(),
));

let processing_for_logging = processing.clone();
tokio::spawn(async move {
loop {
sleep(std::time::Duration::from_secs(10)).await;
let processing_len = processing_for_logging.len();

if processing_len > 0 {
info!("Pending peers: {}", processing_len);
}
}
});

Self { sender, processing }
}

Expand Down Expand Up @@ -181,14 +169,13 @@ pub async fn start_peer_rechecker(
.await;

let reachable_peer_count = authority.get_reachable_peer_count();
let processing_len = processor.processing.len();

info!(
"Starting periodic peer recheck, {} reachable peers",
reachable_peer_count,
"Starting periodic peer recheck, {} reachable peers, {} pending peers",
reachable_peer_count, processing_len
);

let processing_len = processor.processing.len();

if processing_len < PEER_RECHECK_BATCH_SIZE {
for peer in expired_peers {
processor.process(peer).await;
Expand Down

0 comments on commit 22c6b4b

Please sign in to comment.