mirror of
https://github.com/mimblewimble/grin.git
synced 2025-04-30 14:21:14 +03:00
Log ping/pong only in case of a discrepancy (#893)
Not a fix for #888 but related
This commit is contained in:
parent
19bedff664
commit
083d4564c3
1 changed files with 11 additions and 9 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue