GRANDPA: announce blocks we vote on to peers (#1593)

* announce blocks we vote on to peers (missing network impl)

* Implemented 'announce'

* Fixed test

* improve announce docs and add logging

* Track recently announced blocks
This commit is contained in:
Robert Habermeier
2019-01-28 13:41:36 -03:00
committed by André Silva
parent 0078927ac5
commit d027123059
6 changed files with 127 additions and 28 deletions
+5 -1
View File
@@ -175,7 +175,7 @@ fn make_commit_topic(set_id: u64) -> Hash {
hash
}
impl Network for MessageRouting {
impl Network<Block> for MessageRouting {
type In = Box<Stream<Item=Vec<u8>,Error=()> + Send>;
fn messages_for(&self, round: u64, set_id: u64) -> Self::In {
@@ -229,6 +229,10 @@ impl Network for MessageRouting {
inner.peer(self.peer_id).gossip_message(make_commit_topic(set_id), message, true);
inner.route_until_complete();
}
fn announce(&self, _round: u64, _set_id: u64, _block: H256) {
}
}
#[derive(Default, Clone)]