Open one substream for each notifications protocol (#4909)

* Open one substream for each notifications protocol

* Fix WASM build

* Apply suggestions from code review

Co-Authored-By: Toralf Wittner <tw@dtex.org>

* Address concerns

* Use unsigned-varint to read the varint

* Use unsigned-varint

* Forgot Cargo.lock

Co-authored-by: Toralf Wittner <tw@dtex.org>
This commit is contained in:
Pierre Krieger
2020-02-21 11:06:24 +01:00
committed by GitHub
parent f0043055cc
commit 7a04055814
21 changed files with 2231 additions and 151 deletions
+4 -1
View File
@@ -886,7 +886,10 @@ pub fn setup_disabled_grandpa<B, E, Block: BlockT, RA, N>(
// We register the GRANDPA protocol so that we don't consider it an anomaly
// to receive GRANDPA messages on the network. We don't process the
// messages.
network.register_notifications_protocol(communication::GRANDPA_ENGINE_ID);
network.register_notifications_protocol(
communication::GRANDPA_ENGINE_ID,
From::from(communication::GRANDPA_PROTOCOL_NAME),
);
Ok(())
}