Correct bootnodes cli parameter
This commit is contained in:
parent
8e5829c0ba
commit
3f160d3b99
@ -77,7 +77,7 @@ impl ClientConfig {
|
||||
}
|
||||
// Custom listening address ipv4/ipv6
|
||||
// TODO: Handle list of addresses
|
||||
if let Some(listen_address_str) = args.value_of("listen_address") {
|
||||
if let Some(listen_address_str) = args.value_of("listen-address") {
|
||||
if let Ok(listen_address) = listen_address_str.parse::<IpAddr>() {
|
||||
let multiaddr = SocketAddr::new(listen_address, config.net_conf.listen_port)
|
||||
.to_multiaddr()
|
||||
@ -91,7 +91,7 @@ impl ClientConfig {
|
||||
|
||||
// Custom bootnodes
|
||||
// TODO: Handle list of addresses
|
||||
if let Some(boot_addresses_str) = args.value_of("boot_nodes") {
|
||||
if let Some(boot_addresses_str) = args.value_of("boot-nodes") {
|
||||
if let Ok(boot_address) = boot_addresses_str.parse::<Multiaddr>() {
|
||||
config.net_conf.boot_nodes.append(&mut vec![boot_address]);
|
||||
} else {
|
||||
|
@ -26,7 +26,7 @@ fn main() {
|
||||
)
|
||||
// network related arguments
|
||||
.arg(
|
||||
Arg::with_name("listen_address")
|
||||
Arg::with_name("listen-address")
|
||||
.long("listen-address")
|
||||
.value_name("Listen Address")
|
||||
.help("The Network address to listen for p2p connections.")
|
||||
|
@ -122,12 +122,17 @@ impl TestingBeaconStateBuilder {
|
||||
})
|
||||
.collect();
|
||||
|
||||
// TODO: Testing only. Burn with fire later.
|
||||
// set genesis to the last 30 minute block.
|
||||
// this is used for testing only. Allows multiple nodes to connect within a 30min window
|
||||
// and agree on a genesis
|
||||
let now = SystemTime::now()
|
||||
.duration_since(SystemTime::UNIX_EPOCH)
|
||||
.unwrap()
|
||||
.as_secs()
|
||||
- 30;
|
||||
let genesis_time = now; // arbitrary
|
||||
.as_secs();
|
||||
let secs_after_last_period = now.checked_rem(30 * 60).unwrap_or(0);
|
||||
// genesis is now the last 30 minute block.
|
||||
let genesis_time = now - secs_after_last_period;
|
||||
|
||||
let mut state = BeaconState::genesis(
|
||||
genesis_time,
|
||||
|
@ -292,11 +292,13 @@ impl<B: BeaconNodeDuties + 'static, S: Signer + 'static> Service<B, S> {
|
||||
let current_epoch = self.current_slot.epoch(self.spec.slots_per_epoch);
|
||||
// spawn a new thread separate to the runtime
|
||||
// TODO: Handle thread termination/timeout
|
||||
std::thread::spawn(move || {
|
||||
// TODO: Add duties thread back in, with channel to process duties in duty change.
|
||||
// leave sequential for now.
|
||||
//std::thread::spawn(move || {
|
||||
// the return value is a future which returns ready.
|
||||
// built to be compatible with the tokio runtime.
|
||||
let _empty = cloned_manager.run_update(current_epoch, cloned_log.clone());
|
||||
});
|
||||
//});
|
||||
}
|
||||
|
||||
/// If there are any duties to process, spawn a separate thread and perform required actions.
|
||||
|
Loading…
Reference in New Issue
Block a user