Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Commit a2653e8

Browse files
authored
Remove penalty on duplicate Status message (#6377)
1 parent 8e1f753 commit a2653e8

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

client/network/src/protocol.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,6 @@ mod rep {
104104
pub const CLOGGED_PEER: Rep = Rep::new(-(1 << 12), "Clogged message queue");
105105
/// Reputation change when a peer doesn't respond in time to our messages.
106106
pub const TIMEOUT: Rep = Rep::new(-(1 << 10), "Request timeout");
107-
/// Reputation change when a peer sends us a status message while we already received one.
108-
pub const UNEXPECTED_STATUS: Rep = Rep::new(-(1 << 20), "Unexpected status message");
109107
/// Reputation change when we are a light client and a peer is behind us.
110108
pub const PEER_BEHIND_US_LIGHT: Rep = Rep::new(-(1 << 8), "Useless for a light peer");
111109
/// Reputation change when a peer sends us any extrinsic.
@@ -979,12 +977,7 @@ impl<B: BlockT, H: ExHashT> Protocol<B, H> {
979977
trace!(target: "sync", "New peer {} {:?}", who, status);
980978
let _protocol_version = {
981979
if self.context_data.peers.contains_key(&who) {
982-
log!(
983-
target: "sync",
984-
if self.important_peers.contains(&who) { Level::Warn } else { Level::Debug },
985-
"Unexpected status packet from {}", who
986-
);
987-
self.peerset_handle.report_peer(who, rep::UNEXPECTED_STATUS);
980+
debug!(target: "sync", "Ignoring duplicate status packet from {}", who);
988981
return CustomMessageOutcome::None;
989982
}
990983
if status.genesis_hash != self.genesis_hash {

0 commit comments

Comments
 (0)