mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-07 00:42:42 +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
|
.deposit_contract_deploy_block
|
||||||
.saturating_sub(client_config.eth1.follow_distance * 2);
|
.saturating_sub(client_config.eth1.follow_distance * 2);
|
||||||
|
|
||||||
client_config.network.boot_nodes = eth2_testnet_dir
|
if let Some(boot_nodes) = eth2_testnet_dir.boot_enr {
|
||||||
.boot_enr
|
client_config
|
||||||
.as_ref()
|
.network
|
||||||
.ok_or_else(|| "Testnet directory does not contain any boot nodes")?
|
.boot_nodes
|
||||||
.clone();
|
.append(&mut boot_nodes.clone())
|
||||||
|
}
|
||||||
|
|
||||||
if let Some(genesis_state) = eth2_testnet_dir.genesis_state {
|
if let Some(genesis_state) = eth2_testnet_dir.genesis_state {
|
||||||
// Note: re-serializing the genesis state is not so efficient, however it avoids adding
|
// Note: re-serializing the genesis state is not so efficient, however it avoids adding
|
||||||
|
|||||||
Reference in New Issue
Block a user