Refactor beacon chain start code

This commit is contained in:
Paul Hauner
2019-08-26 14:45:49 +10:00
parent 140c677a38
commit cf435d9653
12 changed files with 161 additions and 227 deletions

View File

@@ -1,5 +1,6 @@
use beacon_chain::Bootstrapper;
use clap::ArgMatches;
use client::{BeaconChainStartMethod, Bootstrapper, ClientConfig, Eth2Config};
use client::{BeaconChainStartMethod, ClientConfig, Eth2Config};
use eth2_config::{read_from_file, write_to_file};
use rand::{distributions::Alphanumeric, Rng};
use slog::{crit, info, warn, Logger};

View File

@@ -1,7 +1,4 @@
use client::{
error, notifier, BeaconChainTypes, Client, ClientConfig, ClientType, Eth2Config,
InitialiseBeaconChain,
};
use client::{error, notifier, BeaconChainTypes, Client, ClientConfig, ClientType, Eth2Config};
use futures::sync::oneshot;
use futures::Future;
use slog::{error, info};
@@ -117,7 +114,7 @@ fn run<T>(
log: &slog::Logger,
) -> error::Result<()>
where
T: BeaconChainTypes + InitialiseBeaconChain<T> + Clone,
T: BeaconChainTypes + Clone,
T::Store: OpenDatabase,
{
let store = T::Store::open_database(&db_path)?;