mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 15:47:58 +00:00
Combine default values used at initialization in a trait (#6857)
This moves default values used in the Substrate code base when initializing a service into a common trait. Currently this trait only contains listen ports, but this could be extended in the future. Essentially this will make overriding these values much easier for Cumulus, where we have 2 nodes running in one binary.
This commit is contained in:
@@ -114,8 +114,9 @@ impl NetworkParams {
|
||||
client_id: &str,
|
||||
node_name: &str,
|
||||
node_key: NodeKeyConfig,
|
||||
default_listen_port: u16,
|
||||
) -> NetworkConfiguration {
|
||||
let port = self.port.unwrap_or(30333);
|
||||
let port = self.port.unwrap_or(default_listen_port);
|
||||
|
||||
let listen_addresses = if self.listen_addr.is_empty() {
|
||||
vec![
|
||||
|
||||
Reference in New Issue
Block a user