aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/peering/basalt.rs2
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();
}