Skip to content
Snippets Groups Projects
Commit 7c337285 authored by André Silva's avatar André Silva Committed by asynchronous rob
Browse files

Lower log level of grandpa until_imported message (#1691)

* core: gossip: add missing docs

* core: grandpa: lower log level on until_imported
parent 1cb02c31
No related merge requests found
......@@ -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);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment