From 7c33728510a401559c02f13e6f2d586b7dc4aeab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Silva?= Date: Tue, 5 Feb 2019 18:37:04 +0000 Subject: [PATCH] Lower log level of grandpa until_imported message (#1691) * core: gossip: add missing docs * core: grandpa: lower log level on until_imported --- substrate/core/finality-grandpa/src/until_imported.rs | 2 +- substrate/core/network/src/consensus_gossip.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/substrate/core/finality-grandpa/src/until_imported.rs b/substrate/core/finality-grandpa/src/until_imported.rs index 300a69ab23..edc86d6ce7 100644 --- a/substrate/core/finality-grandpa/src/until_imported.rs +++ b/substrate/core/finality-grandpa/src/until_imported.rs @@ -162,7 +162,7 @@ impl Stream for UntilImported } else { let next_log = *last_log + LOG_PENDING_INTERVAL; if Instant::now() <= next_log { - warn!( + debug!( target: "afg", "Waiting to import block {} before {} votes can be imported. \ Possible fork?", diff --git a/substrate/core/network/src/consensus_gossip.rs b/substrate/core/network/src/consensus_gossip.rs index a5a67b9507..e8c91e74a9 100644 --- a/substrate/core/network/src/consensus_gossip.rs +++ b/substrate/core/network/src/consensus_gossip.rs @@ -24,7 +24,6 @@ use rand::{self, seq::SliceRandom}; use lru_cache::LruCache; use network_libp2p::NodeIndex; use runtime_primitives::traits::{Block as BlockT, Hash, HashFor}; -use runtime_primitives::generic::BlockId; pub use message::generic::{Message, ConsensusMessage}; use protocol::Context; use config::Roles; @@ -173,6 +172,8 @@ impl ConsensusGossip { self.peers.remove(&who); } + /// Prune all existing messages for the given topic and mark it as dead, all + /// new messages for the given topic are ignored. pub fn collect_garbage_for_topic(&mut self, topic: B::Hash) { self.known_dead_topics.insert(topic, ()); self.collect_garbage(|_| true);