mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-17 11:21:07 +00:00
ProtocolId can now be more than 3 bytes (#2350)
This commit is contained in:
committed by
Gavin Wood
parent
517746bd62
commit
b483c5608f
@@ -186,13 +186,7 @@ impl<Components: components::Components> Service<Components> {
|
||||
DEFAULT_PROTOCOL_ID
|
||||
}
|
||||
}.as_bytes();
|
||||
let mut protocol_id = network::ProtocolId::default();
|
||||
if protocol_id_full.len() > protocol_id.len() {
|
||||
warn!("Protocol ID truncated to {} chars", protocol_id.len());
|
||||
}
|
||||
let id_len = protocol_id_full.len().min(protocol_id.len());
|
||||
&mut protocol_id[0..id_len].copy_from_slice(&protocol_id_full[0..id_len]);
|
||||
protocol_id
|
||||
network::ProtocolId::from(protocol_id_full)
|
||||
};
|
||||
|
||||
let has_bootnodes = !network_params.network_config.boot_nodes.is_empty();
|
||||
|
||||
Reference in New Issue
Block a user