From 26a204da21e02b62e1adc63fabee06df2a1bc79f Mon Sep 17 00:00:00 2001 From: Max Inden Date: Mon, 23 Mar 2020 11:04:48 +0100 Subject: [PATCH] client/network-gossip/state_machine: Fix log message (#5350) A gossip validator returns `ValidationResult::Discard` for messages that should not be processed nor kept due to not being useful for the node. Examples are out-of-scope messages or messages with bad signatures. The corresponding log message did not reflect this, thus the update through this patch. One caveat is a finality grandpa neighbor packet. Given that the concept of neighbor packets is handled in the finality grandpa gossip validator only, valid neighbor packets are always discarded on the `client/network-gossip` layer. --- substrate/client/network-gossip/src/state_machine.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/substrate/client/network-gossip/src/state_machine.rs b/substrate/client/network-gossip/src/state_machine.rs index 0eff93653c..e2d7ec45b5 100644 --- a/substrate/client/network-gossip/src/state_machine.rs +++ b/substrate/client/network-gossip/src/state_machine.rs @@ -353,8 +353,7 @@ impl ConsensusGossip { /// Handle an incoming message for topic by who via protocol. Discard message if topic already /// known, the message is old, its source peers isn't a registered peer or the connection to - /// them is broken. Return `Some(topic, message)` if it was added to the internal queue, `None` - /// in all other cases. + /// them is broken. pub fn on_incoming( &mut self, network: &mut dyn Network, @@ -421,7 +420,7 @@ impl ConsensusGossip { network.report_peer(who.clone(), rep::UNREGISTERED_TOPIC); } } else { - trace!(target:"gossip", "Handled valid one hop message from peer {}", who); + trace!(target:"gossip", "Discard message from peer {}", who); } } }