Skip to content

Commit

Permalink
poll: Change log message on incompatible peer
Browse files Browse the repository at this point in the history
  • Loading branch information
nepet committed Oct 15, 2022
1 parent c9fefe8 commit fd1b430
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions poll/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,11 @@ func (s *Service) MessageHandler(peerId string, msgType string, payload []byte)
return nil
}
}
log.Debugf("Received poll from peer %s: %s", peerId, string(payload))
if msg.Version != swap.PEERSWAP_PROTOCOL_VERSION {
log.Debugf("Received poll from INCOMPATIBLE peer %s: %s", peerId, string(payload))
} else {
log.Debugf("Received poll from peer %s: %s", peerId, string(payload))
}
s.tmpStore[peerId] = string(payload)
return nil
case messages.MESSAGETYPE_REQUEST_POLL:
Expand All @@ -215,7 +219,11 @@ func (s *Service) MessageHandler(peerId string, msgType string, payload []byte)
return nil
}
}
log.Debugf("Received poll from peer %s: %s", peerId, string(payload))
if msg.Version != swap.PEERSWAP_PROTOCOL_VERSION {
log.Debugf("Received poll from INCOMPATIBLE peer %s: %s", peerId, string(payload))
} else {
log.Debugf("Received poll from peer %s: %s", peerId, string(payload))
}
s.tmpStore[peerId] = string(payload)
return nil
default:
Expand Down

0 comments on commit fd1b430

Please sign in to comment.