diff options
author | Alex Auvolat <alex@adnab.me> | 2020-12-11 20:04:49 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2020-12-11 20:04:49 +0100 |
commit | dbb15807b927c27df53bb4a6964c268a140635b3 (patch) | |
tree | 8b7d69a366a5bd693480a47ace13d87b82aebb7d | |
parent | a7d92689e04cbb2e3e8b1be2d967f30349007be7 (diff) | |
download | netapp-dbb15807b927c27df53bb4a6964c268a140635b3.tar.gz netapp-dbb15807b927c27df53bb4a6964c268a140635b3.zip |
Tentative trace
-rw-r--r-- | src/peering/basalt.rs | 2 |
1 files changed, 2 insertions, 0 deletions
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(); } |