Skip to content

Commit

Permalink
Merge branch 'beacon_state_deposits' of github.com:berachain/beacon-k…
Browse files Browse the repository at this point in the history
…it into beacon_state_deposits_cleanup
  • Loading branch information
calbera committed Dec 19, 2024
2 parents cee7735 + 9b7bb68 commit 6eccb1e
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion beacon/blockchain/init_chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,23 @@ func (s *Service[
s.logger.Error("Failed to unmarshal genesis data", "error", err)
return nil, err
}
return s.stateProcessor.InitializePreminedBeaconStateFromEth1(

validatorUpdates, err := s.stateProcessor.InitializePreminedBeaconStateFromEth1(
s.storageBackend.StateFromContext(ctx),
genesisData.GetDeposits(),
genesisData.GetExecutionPayloadHeader(),
genesisData.GetForkVersion(),
)
if err != nil {
return nil, err
}

// After deposits are validated, store the genesis deposits in the deposit store.
if err = s.storageBackend.DepositStore().EnqueueDeposits(
genesisData.GetDeposits(),
); err != nil {
return nil, err
}

return validatorUpdates, nil
}

0 comments on commit 6eccb1e

Please sign in to comment.