Userland clean up (#1277)

* Improve logging, remove unused CLI and move discovery

* Correct tests

* Handle flag correctly
This commit is contained in:
Age Manning
2020-06-20 09:34:28 +10:00
committed by GitHub
parent f3d05c15d1
commit 710409c2ba
13 changed files with 53 additions and 123 deletions

View File

@@ -39,12 +39,6 @@ pub struct Config {
/// Target number of connected peers.
pub max_peers: usize,
/// A secp256k1 secret key, as bytes in ASCII-encoded hex.
///
/// With or without `0x` prefix.
#[serde(skip)]
pub secret_key_hex: Option<String>,
/// Gossipsub configuration parameters.
#[serde(skip)]
pub gs_config: GossipsubConfig,
@@ -64,11 +58,6 @@ pub struct Config {
/// List of extra topics to initially subscribe to as strings.
pub topics: Vec<GossipKind>,
/// Introduces randomization in network propagation of messages. This should only be set for
/// testing purposes and will likely be removed in future versions.
// TODO: Remove this functionality for mainnet
pub propagation_percentage: Option<u8>,
}
impl Default for Config {
@@ -131,14 +120,12 @@ impl Default for Config {
enr_udp_port: None,
enr_tcp_port: None,
max_peers: 50,
secret_key_hex: None,
gs_config,
discv5_config,
boot_nodes: vec![],
libp2p_nodes: vec![],
client_version: version::version(),
topics,
propagation_percentage: None,
}
}
}