core: grandpa: collect garbage for topic (#1780)

* core: grandpa: collect garbage for topic

* core: grandpa: use collect_garbage_for_topic in tests
This commit is contained in:
André Silva
2019-02-13 14:37:44 +00:00
committed by Gav Wood
parent 380d17d989
commit f8246ebcdf
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -372,8 +372,8 @@ impl<V: 'static + Verifier<Block>, D> Peer<V, D> {
.send(ProtocolMsg::GossipConsensusMessage(topic, data, broadcast));
}
pub fn consensus_gossip_collect_garbage_for(&self, topic: <Block as BlockT>::Hash) {
self.with_gossip(move |gossip, _| gossip.collect_garbage(|t| t == &topic))
pub fn consensus_gossip_collect_garbage_for_topic(&self, topic: <Block as BlockT>::Hash) {
self.with_gossip(move |gossip, _| gossip.collect_garbage_for_topic(topic))
}
/// access the underlying consensus gossip handler