Log ping/pong only in case of a discrepancy ()

Not a fix for  but related
This commit is contained in:
hashmap 2018-03-27 23:33:13 +02:00 committed by Ignotus Peverell
parent 19bedff664
commit 083d4564c3

View file

@ -621,15 +621,17 @@ impl NetAdapter for Peers {
}
fn peer_difficulty(&self, addr: SocketAddr, diff: Difficulty, height: u64) {
debug!(
LOGGER,
"ping/pong: {}: {} @ {} vs us: {} @ {}",
addr,
diff,
height,
self.total_difficulty(),
self.total_height()
);
if diff != self.total_difficulty() || height != self.total_height() {
debug!(
LOGGER,
"ping/pong: {}: {} @ {} vs us: {} @ {}",
addr,
diff,
height,
self.total_difficulty(),
self.total_height()
);
}
if diff.into_num() > 0 {
if let Some(peer) = self.get_connected_peer(&addr) {