mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-15 15:01:06 +00:00
Don't mark peers sending expired messages as useless (#1944)
This commit is contained in:
committed by
Bastian Köcher
parent
9f3b4468db
commit
8d290f6110
@@ -303,7 +303,6 @@ impl<B: BlockT> ConsensusGossip<B> {
|
|||||||
protocol: &mut Context<B>,
|
protocol: &mut Context<B>,
|
||||||
who: NodeIndex,
|
who: NodeIndex,
|
||||||
message: ConsensusMessage,
|
message: ConsensusMessage,
|
||||||
is_syncing: bool,
|
|
||||||
) -> Option<(B::Hash, ConsensusMessage)> {
|
) -> Option<(B::Hash, ConsensusMessage)> {
|
||||||
let message_hash = HashFor::<B>::hash(&message.data[..]);
|
let message_hash = HashFor::<B>::hash(&message.data[..]);
|
||||||
|
|
||||||
@@ -332,12 +331,6 @@ impl<B: BlockT> ConsensusGossip<B> {
|
|||||||
},
|
},
|
||||||
Some(ValidationResult::Expired) => {
|
Some(ValidationResult::Expired) => {
|
||||||
trace!(target:"gossip", "Ignored expired message from {}", who);
|
trace!(target:"gossip", "Ignored expired message from {}", who);
|
||||||
if !is_syncing {
|
|
||||||
protocol.report_peer(
|
|
||||||
who,
|
|
||||||
Severity::Useless(format!("Sent expired consensus message")),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
None => {
|
None => {
|
||||||
|
|||||||
@@ -484,7 +484,6 @@ impl<B: BlockT, S: NetworkSpecialization<B>, H: ExHashT> Protocol<B, S, H> {
|
|||||||
&mut ProtocolContext::new(&mut self.context_data, &self.network_chan),
|
&mut ProtocolContext::new(&mut self.context_data, &self.network_chan),
|
||||||
who,
|
who,
|
||||||
msg,
|
msg,
|
||||||
self.sync.status().is_major_syncing(),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
other => self.specialization.on_message(
|
other => self.specialization.on_message(
|
||||||
|
|||||||
Reference in New Issue
Block a user