Skip to content

Commit

Permalink
chore: remove debug leftovers
Browse files Browse the repository at this point in the history
  • Loading branch information
Frando committed Aug 4, 2023
1 parent 3145b6a commit 19eef0f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
20 changes: 0 additions & 20 deletions iroh-gossip/src/proto/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,11 +338,6 @@ impl Simulator {
for peer in received.iter() {
expected.remove(peer);
}
// eprintln!(
// "tick {tick:3} received {:5} remaining {:5} ",
// received.len(),
// expected.len(),
// );
}

assert!(expected.is_empty(), "all nodes received the broadcast");
Expand Down Expand Up @@ -467,18 +462,3 @@ pub fn report_round_distribution<PI: PeerIdentity, R: Rng + Clone>(network: &Net
eprintln!("active_distrib {active_distrib:?}");
eprintln!("passive_distrib {passive_distrib:?}");
}

// pub fn report_active<PI: PeerIdentity, R: Rng + Clone>(network: &Network<PI, R>, topic: &TopicId) {
// for state in &network.peers {
// let me = state.me();
// match state.state(topic) {
// Some(state) => {
// let peers = state.swarm.active_view.iter().collect::<Vec<_>>();
// eprintln!("{me:?}: {:?}", peers);
// }
// None => {
// eprintln!("{me:?}: QUIT");
// }
// }
// }
// }
2 changes: 1 addition & 1 deletion iroh-gossip/src/proto/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ impl<K: Hash + Eq + Clone, V> TimeBoundCache<K, V> {
self.map.get(key).map(|(expires, _value)| expires)
}

/// Get an item from the cache.
/// Iterate over all items in the cache.
pub fn iter(&self) -> impl Iterator<Item = (&K, &V, &Instant)> {
self.map.iter().map(|(k, (expires, v))| (k, v, expires))
}
Expand Down

0 comments on commit 19eef0f

Please sign in to comment.