mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 13:27:57 +00:00
Fix crash when --in-peers & --out-peers both 0 (#14598)
This commit is contained in:
@@ -785,12 +785,14 @@ where
|
||||
};
|
||||
|
||||
let (state_request_protocol_config, state_request_protocol_name) = {
|
||||
let num_peer_hint = net_config.network_config.default_peers_set_num_full as usize +
|
||||
net_config.network_config.default_peers_set.reserved_nodes.len();
|
||||
// Allow both outgoing and incoming requests.
|
||||
let (handler, protocol_config) = StateRequestHandler::new(
|
||||
&protocol_id,
|
||||
config.chain_spec.fork_id(),
|
||||
client.clone(),
|
||||
net_config.network_config.default_peers_set_num_full as usize,
|
||||
num_peer_hint,
|
||||
);
|
||||
let config_name = protocol_config.name.clone();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user