aboutsummaryrefslogtreecommitdiff
path: root/src/peering/basalt.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-12-12 19:27:18 +0100
committerAlex Auvolat <alex@adnab.me>2020-12-12 19:27:18 +0100
commit50401989724ed70f031055463e21caad76589742 (patch)
tree41dcb6481344f7cda3bd1fada9a76fe4bfea2c52 /src/peering/basalt.rs
parent54c7c50bb57450f4fbb62eb5e6258bc34f37a99d (diff)
downloadnetapp-50401989724ed70f031055463e21caad76589742.tar.gz
netapp-50401989724ed70f031055463e21caad76589742.zip
Make it passive-client-friendly
Diffstat (limited to 'src/peering/basalt.rs')
-rw-r--r--src/peering/basalt.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/peering/basalt.rs b/src/peering/basalt.rs
index 1898dba..4d56319 100644
--- a/src/peering/basalt.rs
+++ b/src/peering/basalt.rs
@@ -150,7 +150,13 @@ 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));
+ 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;
}