Skip to content

Commit

Permalink
Store genesis deposits in store
Browse files Browse the repository at this point in the history
  • Loading branch information
calbera committed Dec 19, 2024
1 parent 59ee7ab commit f37e71b
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions 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(),
)
); err != nil {
return nil, err

Check failure on line 50 in beacon/blockchain/init_chain.go

View workflow job for this annotation

GitHub Actions / build

syntax error: unexpected return, expected expression
}

// After deposits are validated, store the genesis deposits in the deposit store.
if err := s.storageBackend.DepositStore().EnqueueDeposits(

Check failure on line 54 in beacon/blockchain/init_chain.go

View workflow job for this annotation

GitHub Actions / build

syntax error: non-declaration statement outside function body
genesisData.GetDeposits(),
); err != nil {
return nil, err
}

return validatorUpdates, nil
}

0 comments on commit f37e71b

Please sign in to comment.