Make genesis beacon state return a beacon state
This commit is contained in:
parent
f69b56ad60
commit
49d066015b
@ -15,7 +15,7 @@ pub fn get_genesis_state(
|
|||||||
genesis_time: u64,
|
genesis_time: u64,
|
||||||
genesis_eth1_data: Eth1Data,
|
genesis_eth1_data: Eth1Data,
|
||||||
spec: &ChainSpec,
|
spec: &ChainSpec,
|
||||||
) -> Result<(), BlockProcessingError> {
|
) -> Result<BeaconState, BlockProcessingError> {
|
||||||
// Get the genesis `BeaconState`
|
// Get the genesis `BeaconState`
|
||||||
let mut state = BeaconState::genesis(genesis_time, genesis_eth1_data, spec);
|
let mut state = BeaconState::genesis(genesis_time, genesis_eth1_data, spec);
|
||||||
|
|
||||||
@ -42,7 +42,7 @@ pub fn get_genesis_state(
|
|||||||
// Generate the current shuffling seed.
|
// Generate the current shuffling seed.
|
||||||
state.current_shuffling_seed = state.generate_seed(spec.genesis_epoch, spec)?;
|
state.current_shuffling_seed = state.generate_seed(spec.genesis_epoch, spec)?;
|
||||||
|
|
||||||
Ok(())
|
Ok(state)
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<BlockProcessingError> for GenesisError {
|
impl From<BlockProcessingError> for GenesisError {
|
||||||
|
Loading…
Reference in New Issue
Block a user