Move get_active_validator_indices to state

This commit is contained in:
Paul Hauner
2019-03-19 09:09:57 +11:00
parent 4c4952e71b
commit 37b8e9f39a
17 changed files with 57 additions and 239 deletions

View File

@@ -34,7 +34,7 @@ pub fn get_genesis_state(
// Set all the active index roots to be the genesis active index root.
let active_validator_indices = state
.get_active_validator_indices(spec.genesis_epoch, spec)?
.get_cached_active_validator_indices(RelativeEpoch::Current, spec)?
.to_vec();
let genesis_active_index_root = Hash256::from_slice(&active_validator_indices.hash_tree_root());
state.fill_active_index_roots_with(genesis_active_index_root, spec);