mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-11 18:04:18 +00:00
Add progress on state_processing fixed-len update
This commit is contained in:
@@ -10,12 +10,12 @@ pub enum GenesisError {
|
||||
/// Returns the genesis `BeaconState`
|
||||
///
|
||||
/// Spec v0.5.1
|
||||
pub fn get_genesis_state(
|
||||
pub fn get_genesis_state<T: BeaconStateTypes>(
|
||||
genesis_validator_deposits: &[Deposit],
|
||||
genesis_time: u64,
|
||||
genesis_eth1_data: Eth1Data,
|
||||
spec: &ChainSpec,
|
||||
) -> Result<BeaconState, BlockProcessingError> {
|
||||
) -> Result<BeaconState<T>, BlockProcessingError> {
|
||||
// Get the genesis `BeaconState`
|
||||
let mut state = BeaconState::genesis(genesis_time, genesis_eth1_data, spec);
|
||||
|
||||
@@ -37,7 +37,7 @@ pub fn get_genesis_state(
|
||||
.get_cached_active_validator_indices(RelativeEpoch::Current, spec)?
|
||||
.to_vec();
|
||||
let genesis_active_index_root = Hash256::from_slice(&active_validator_indices.tree_hash_root());
|
||||
state.fill_active_index_roots_with(genesis_active_index_root, spec);
|
||||
state.fill_active_index_roots_with(genesis_active_index_root);
|
||||
|
||||
// Generate the current shuffling seed.
|
||||
state.current_shuffling_seed = state.generate_seed(spec.genesis_epoch, spec)?;
|
||||
|
||||
Reference in New Issue
Block a user