mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 21:37: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:
@@ -21,7 +21,9 @@
|
||||
use libp2p::{multiaddr, Multiaddr, PeerId};
|
||||
use std::{fmt, str, str::FromStr};
|
||||
|
||||
/// Name of a protocol, transmitted on the wire. Should be unique for each chain. Always UTF-8.
|
||||
/// Protocol name prefix, transmitted on the wire for legacy protocol names.
|
||||
/// I.e., `dot` in `/dot/sync/2`. Should be unique for each chain. Always UTF-8.
|
||||
/// Deprecated in favour of genesis hash & fork ID based protocol names.
|
||||
#[derive(Clone, PartialEq, Eq, Hash)]
|
||||
pub struct ProtocolId(smallvec::SmallVec<[u8; 6]>);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user