mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 10:22:38 +00:00
Allow testnet dir without boot nodes
This commit is contained in:
@@ -350,11 +350,12 @@ fn init_new_client<E: EthSpec>(
|
||||
.deposit_contract_deploy_block
|
||||
.saturating_sub(client_config.eth1.follow_distance * 2);
|
||||
|
||||
client_config.network.boot_nodes = eth2_testnet_dir
|
||||
.boot_enr
|
||||
.as_ref()
|
||||
.ok_or_else(|| "Testnet directory does not contain any boot nodes")?
|
||||
.clone();
|
||||
if let Some(boot_nodes) = eth2_testnet_dir.boot_enr {
|
||||
client_config
|
||||
.network
|
||||
.boot_nodes
|
||||
.append(&mut boot_nodes.clone())
|
||||
}
|
||||
|
||||
if let Some(genesis_state) = eth2_testnet_dir.genesis_state {
|
||||
// Note: re-serializing the genesis state is not so efficient, however it avoids adding
|
||||
|
||||
Reference in New Issue
Block a user