aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-12-04 13:58:34 +0100
committerAlex Auvolat <alex@adnab.me>2020-12-04 13:58:34 +0100
commitb63179c699e0569d45826bccb4b9f2f1bc53c30e (patch)
tree7472ccda59d37531edbb3ffeff207edef51ee09d /src
parent56c524bbea64a85d7ced56406b0855041783845f (diff)
downloadnetapp-b63179c699e0569d45826bccb4b9f2f1bc53c30e.tar.gz
netapp-b63179c699e0569d45826bccb4b9f2f1bc53c30e.zip
Logging
Diffstat (limited to 'src')
-rw-r--r--src/peering/basalt.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/peering/basalt.rs b/src/peering/basalt.rs
index 5da65e0..00cfd60 100644
--- a/src/peering/basalt.rs
+++ b/src/peering/basalt.rs
@@ -3,7 +3,7 @@ use std::net::SocketAddr;
use std::sync::{Arc, RwLock};
use std::time::Duration;
-use log::{debug, warn};
+use log::{debug, info, warn};
use lru::LruCache;
use rand::{thread_rng, Rng};
use serde::{Deserialize, Serialize};
@@ -302,7 +302,10 @@ impl Basalt {
.unwrap()
.sample(count)
.iter()
- .map(|p| p.id)
+ .map(|p| {
+ info!("KYEV S {}", hex::encode(p.id));
+ p.id
+ })
.collect::<Vec<_>>()
}
@@ -421,6 +424,7 @@ impl Basalt {
if is_incoming {
self.handle_peer_list(&[Peer { id: pk, addr }][..]);
} else {
+ info!("KYEV C {}", hex::encode(pk));
let peer = Peer { id: pk, addr };
let mut backlog = self.backlog.write().unwrap();
@@ -443,6 +447,7 @@ impl Basalt {
fn on_disconnected(&self, pk: ed25519::PublicKey, is_incoming: bool) {
if !is_incoming {
+ info!("KYEV D {}", hex::encode(pk));
self.view.write().unwrap().disconnected(pk);
}
}