Integrate discv5 into lighthouse

This commit is contained in:
Age Manning
2019-06-25 14:51:45 +10:00
parent 84ea5adffe
commit 81f0b6c238
12 changed files with 312 additions and 351 deletions

View File

@@ -37,11 +37,33 @@ fn main() {
.help("One or more comma-delimited multi-addresses to listen for p2p connections.")
.takes_value(true),
)
.arg(
Arg::with_name("maxpeers")
.long("maxpeers")
.value_name("Max Peers")
.help("The maximum number of peers (default 10)")
.takes_value(true),
)
.arg(
Arg::with_name("boot-nodes")
.long("boot-nodes")
.allow_hyphen_values(true)
.value_name("BOOTNODES")
.help("One or more comma-delimited multi-addresses to bootstrap the p2p network.")
.help("One or more comma-delimited base64-encoded ENR's to bootstrap the p2p network.")
.takes_value(true),
)
.arg(
Arg::with_name("disc-listen-address")
.long("disc-listen_address")
.value_name("DISCPORT")
.help("The IP address that the discovery protocol will listen on. Defaults to 0.0.0.0")
.takes_value(true),
)
.arg(
Arg::with_name("discovery-port")
.long("disc-port")
.value_name("DISCPORT")
.help("Listen UDP port for the discovery process")
.takes_value(true),
)
// rpc related arguments

View File

@@ -84,7 +84,7 @@ pub fn run_beacon_node(
info!(
log,
"Started beacon node";
"p2p_listen_addresses" => format!("{:?}", &other_client_config.network.listen_addresses()),
"p2p_listen_addresses" => format!("{:?}", &other_client_config.network.listen_addresses),
"data_dir" => format!("{:?}", other_client_config.data_dir()),
"spec_constants" => &spec_constants,
"db_type" => &other_client_config.db_type,