Merge branch 'interop' into millsecond-slots

This commit is contained in:
Paul Hauner
2019-08-29 13:27:06 +10:00
16 changed files with 1049 additions and 432 deletions

View File

@@ -1,12 +1,10 @@
use crate::{BeaconChain, BeaconChainTypes, BlockProcessingOutcome};
use lmd_ghost::LmdGhost;
use sloggers::{null::NullLoggerBuilder, Build};
use slot_clock::SlotClock;
use slot_clock::TestingSlotClock;
use state_processing::per_slot_processing;
use std::marker::PhantomData;
use std::sync::Arc;
use std::time::Duration;
use store::MemoryStore;
use store::Store;
use tree_hash::{SignedRoot, TreeHash};
@@ -115,23 +113,9 @@ where
let builder = NullLoggerBuilder;
let log = builder.build().expect("logger should build");
// Slot clock
let slot_clock = TestingSlotClock::from_eth2_genesis(
spec.genesis_slot,
genesis_state.genesis_time,
Duration::from_secs(spec.seconds_per_slot),
)
.expect("Slot clock should start");
let chain = BeaconChain::from_genesis(
store,
slot_clock,
genesis_state,
genesis_block,
spec.clone(),
log,
)
.expect("Terminate if beacon chain generation fails");
let chain =
BeaconChain::from_genesis(store, genesis_state, genesis_block, spec.clone(), log)
.expect("Terminate if beacon chain generation fails");
Self {
chain,