Remove grandpa liveness oracle (#1271)

* core: support broadcasting consensus message to all peers

* grandpa: remove liveness oracle

* node: always start grandpa on full nodes

* core: don't check for grandpa justifications on failed block imports

* core: fix network connectivity test
This commit is contained in:
André Silva
2018-12-15 22:39:48 +03:00
committed by Robert Habermeier
parent b2ce2f4bd9
commit 45d53ad022
11 changed files with 208 additions and 260 deletions
+4 -4
View File
@@ -285,8 +285,8 @@ impl<B: BlockT, S: NetworkSpecialization<B>, H: ExHashT> Protocol<B, S, H> {
GenericMessage::RemoteHeaderResponse(response) => self.on_remote_header_response(io, who, response),
GenericMessage::RemoteChangesRequest(request) => self.on_remote_changes_request(io, who, request),
GenericMessage::RemoteChangesResponse(response) => self.on_remote_changes_response(io, who, response),
GenericMessage::Consensus(topic, msg) => {
self.consensus_gossip.write().on_incoming(&mut ProtocolContext::new(&self.context_data, io), who, topic, msg);
GenericMessage::Consensus(topic, msg, broadcast) => {
self.consensus_gossip.write().on_incoming(&mut ProtocolContext::new(&self.context_data, io), who, topic, msg, broadcast);
},
other => self.specialization.write().on_message(&mut ProtocolContext::new(&self.context_data, io), who, &mut Some(other)),
}
@@ -296,10 +296,10 @@ impl<B: BlockT, S: NetworkSpecialization<B>, H: ExHashT> Protocol<B, S, H> {
send_message::<B, H>(&self.context_data.peers, io, who, message)
}
pub fn gossip_consensus_message(&self, io: &mut SyncIo, topic: B::Hash, message: Vec<u8>) {
pub fn gossip_consensus_message(&self, io: &mut SyncIo, topic: B::Hash, message: Vec<u8>, broadcast: bool) {
let gossip = self.consensus_gossip();
self.with_spec(io, move |_s, context|{
gossip.write().multicast(context, topic, message);
gossip.write().multicast(context, topic, message, broadcast);
});
}