Skip to content

Commit

Permalink
Add check for slot == 0 (#5322)
Browse files Browse the repository at this point in the history
  • Loading branch information
terencechain authored Apr 6, 2020
1 parent 35a6df7 commit 91b19b9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion beacon-chain/blockchain/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ func (s *Service) Start() {
attestationProcessorSubscribed := make(chan struct{}, 1)

// If the chain has already been initialized, simply start the block processing routine.
if beaconState != nil {
// A node should still initialize rest of the chain service if the finalized state's slot is 0.
if beaconState != nil && beaconState.Slot() != 0 {
log.Info("Blockchain data already exists in DB, initializing...")
s.genesisTime = time.Unix(int64(beaconState.GenesisTime()), 0)
s.opsService.SetGenesisTime(beaconState.GenesisTime())
Expand Down

0 comments on commit 91b19b9

Please sign in to comment.