mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-29 20:47:56 +00:00
Use custom type for ProtocolName (#12172)
* Add ProtocolName custom type * Use new ProtocolName in sc_network_common * Use new ProtocolName in sc_network * Use new ProtocolName for BEEFY and GRANDPA * Use new ProtocolName for notifications * Use new ProtocolName in sc_network (part 2) * Use new ProtocolName in sc_network_gossip * Use new ProtocolName in sc_offchain * Remove unused imports * Some more fixes * Add tests * Fix minor import issues * Re-export ProtocolName in sc_network * Revert "Re-export ProtocolName in sc_network" This reverts commit 8d8ff71927e7750757f29c9bbd88dc0ba181d214. * Re-export ProtocolName in sc_network * Remove dependency on sc-network-common from beefy-gadget
This commit is contained in:
@@ -23,7 +23,6 @@ mod block_import;
|
||||
mod sync;
|
||||
|
||||
use std::{
|
||||
borrow::Cow,
|
||||
collections::HashMap,
|
||||
marker::PhantomData,
|
||||
pin::Pin,
|
||||
@@ -58,6 +57,7 @@ use sc_network::{
|
||||
};
|
||||
use sc_network_common::{
|
||||
config::{MultiaddrWithPeerId, ProtocolId},
|
||||
protocol::ProtocolName,
|
||||
service::{NetworkBlock, NetworkStateInfo, NetworkSyncForkRequest},
|
||||
sync::warp::{AuthorityList, EncodedProof, SetId, VerificationResult, WarpSyncProvider},
|
||||
};
|
||||
@@ -682,7 +682,7 @@ pub struct FullPeerConfig {
|
||||
/// Block announce validator.
|
||||
pub block_announce_validator: Option<Box<dyn BlockAnnounceValidator<Block> + Send + Sync>>,
|
||||
/// List of notification protocols that the network must support.
|
||||
pub notifications_protocols: Vec<Cow<'static, str>>,
|
||||
pub notifications_protocols: Vec<ProtocolName>,
|
||||
/// The indices of the peers the peer should be connected to.
|
||||
///
|
||||
/// If `None`, it will be connected to all other peers.
|
||||
|
||||
Reference in New Issue
Block a user