mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-10 12:11:59 +00:00
Adds bootnodes to chainspec. Handles type correctly
This commit is contained in:
@@ -7,13 +7,11 @@ edition = "2018"
|
||||
[dependencies]
|
||||
beacon_chain = { path = "../beacon_chain" }
|
||||
network = { path = "../network" }
|
||||
libp2p = { path = "../libp2p" }
|
||||
sync = { path = "../sync" }
|
||||
db = { path = "../db" }
|
||||
fork_choice = { path = "../../eth2/fork_choice" }
|
||||
types = { path = "../../eth2/types" }
|
||||
slot_clock = { path = "../../eth2/utils/slot_clock" }
|
||||
|
||||
error-chain = "0.12.0"
|
||||
slog = "^2.2.3"
|
||||
tokio = "0.1.15"
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
use clap::ArgMatches;
|
||||
use db::DBType;
|
||||
use fork_choice::ForkChoiceAlgorithm;
|
||||
use libp2p::multiaddr::ToMultiaddr;
|
||||
use network::NetworkConfig;
|
||||
use slog::error;
|
||||
use std::fs;
|
||||
use std::net::IpAddr;
|
||||
use std::net::SocketAddr;
|
||||
use std::path::PathBuf;
|
||||
use types::multiaddr::ToMultiaddr;
|
||||
use types::ChainSpec;
|
||||
|
||||
/// Stores the client configuration for this Lighthouse instance.
|
||||
@@ -32,11 +32,15 @@ impl Default for ClientConfig {
|
||||
};
|
||||
fs::create_dir_all(&data_dir)
|
||||
.unwrap_or_else(|_| panic!("Unable to create {:?}", &data_dir));
|
||||
|
||||
let default_spec = ChainSpec::lighthouse_testnet();
|
||||
let default_net_conf = NetworkConfig::new(default_spec.boot_nodes.clone());
|
||||
|
||||
Self {
|
||||
data_dir: data_dir.clone(),
|
||||
// default to foundation for chain specs
|
||||
spec: ChainSpec::foundation(),
|
||||
net_conf: NetworkConfig::default(),
|
||||
spec: default_spec,
|
||||
net_conf: default_net_conf,
|
||||
// default to bitwise LMD Ghost
|
||||
fork_choice: ForkChoiceAlgorithm::BitwiseLMDGhost,
|
||||
// default to memory db for now
|
||||
|
||||
Reference in New Issue
Block a user