Add new beacon chain test harness

This commit is contained in:
Paul Hauner
2019-06-16 02:24:33 -04:00
parent 1128de535d
commit 8fb6ffffe2
4 changed files with 154 additions and 2 deletions

View File

@@ -88,6 +88,8 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
genesis_block: BeaconBlock,
spec: ChainSpec,
) -> Result<Self, Error> {
genesis_state.build_all_caches(&spec)?;
let state_root = genesis_state.canonical_root();
store.put(&state_root, &genesis_state)?;
@@ -105,8 +107,6 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
state_root,
));
genesis_state.build_all_caches(&spec)?;
Ok(Self {
spec,
slot_clock,