Lower log level of grandpa until_imported message (#1691)

* core: gossip: add missing docs

* core: grandpa: lower log level on until_imported
This commit is contained in:
André Silva
2019-02-05 18:37:04 +00:00
committed by Robert Habermeier
parent 1cb02c318b
commit 7c33728510
2 changed files with 3 additions and 2 deletions
@@ -162,7 +162,7 @@ impl<Block: BlockT, Status, I, M> Stream for UntilImported<Block, Status, I, M>
} 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?",
@@ -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<B: BlockT> ConsensusGossip<B> {
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);