Log ping/pong only in case of a discrepancy
Not a fix for but related
@@ -621,6 +621,7 @@ impl NetAdapter for Peers {
}
fn peer_difficulty(&self, addr: SocketAddr, diff: Difficulty, height: u64) {
+ if diff != self.total_difficulty() || height != self.total_height() {
debug!(
LOGGER,
"ping/pong: {}: {} @ {} vs us: {} @ {}",
@@ -630,6 +631,7 @@ impl NetAdapter for Peers {
self.total_difficulty(),
self.total_height()
);
+ }
if diff.into_num() > 0 {
if let Some(peer) = self.get_connected_peer(&addr) {
