From dbb15807b927c27df53bb4a6964c268a140635b3 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Fri, 11 Dec 2020 20:04:49 +0100 Subject: [PATCH] Tentative trace --- src/peering/basalt.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/peering/basalt.rs b/src/peering/basalt.rs index 289b411..1898dba 100644 --- a/src/peering/basalt.rs +++ b/src/peering/basalt.rs @@ -150,6 +150,7 @@ impl BasaltView { for peer in peers.iter() { let peer_cost = peer.cost(&self.slots[i].seed); if self.slots[i].peer.is_none() || peer_cost < slot_cost { + trace!("Best match for slot {}: {}@{} (cost {})", i, hex::encode(peer.id), peer.addr, hex::encode(peer_cost)); self.slots[i].peer = Some(*peer); slot_cost = peer_cost; } @@ -212,6 +213,7 @@ impl BasaltView { fn reset_some_slots(&mut self, count: usize) { for _i in 0..count { + trace!("Reset slot {}", self.i_reset); self.slots[self.i_reset].seed = rand_seed(); self.i_reset = (self.i_reset + 1) % self.slots.len(); }