mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-01 04:31:02 +00:00
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:
@@ -65,6 +65,7 @@ mod periodic;
|
||||
pub(crate) mod tests;
|
||||
|
||||
pub use sp_finality_grandpa::GRANDPA_ENGINE_ID;
|
||||
pub const GRANDPA_PROTOCOL_NAME: &[u8] = b"/paritytech/grandpa/1";
|
||||
|
||||
// cost scalars for reporting peers.
|
||||
mod cost {
|
||||
@@ -185,7 +186,12 @@ impl<B: BlockT, N: Network<B>> NetworkBridge<B, N> {
|
||||
);
|
||||
|
||||
let validator = Arc::new(validator);
|
||||
let gossip_engine = GossipEngine::new(service.clone(), GRANDPA_ENGINE_ID, validator.clone());
|
||||
let gossip_engine = GossipEngine::new(
|
||||
service.clone(),
|
||||
GRANDPA_ENGINE_ID,
|
||||
GRANDPA_PROTOCOL_NAME,
|
||||
validator.clone()
|
||||
);
|
||||
|
||||
{
|
||||
// register all previous votes with the gossip service so that they're
|
||||
|
||||
Reference in New Issue
Block a user