Skip to content

Commit d2eb45c

Browse files
committed
Kasey's review #3
1 parent f0ec608 commit d2eb45c

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

beacon-chain/blockchain/service.go

+4-7
Original file line numberDiff line numberDiff line change
@@ -340,17 +340,14 @@ func (s *Service) initializeHead(ctx context.Context, st state.BeaconState) erro
340340
return errors.Wrap(err, "could not get head state")
341341
}
342342
}
343+
if err := s.setHead(&head{root, blk, st, blk.Block().Slot(), false}); err != nil {
344+
return errors.Wrap(err, "could not set head")
345+
}
343346
log.WithFields(logrus.Fields{
344347
"root": fmt.Sprintf("%#x", root),
345348
"slot": blk.Block().Slot(),
346349
}).Info("Initialized head block from DB")
347-
return errors.Wrap(s.setHead(&head{
348-
root,
349-
blk,
350-
st,
351-
blk.Block().Slot(),
352-
false,
353-
}), "could not set head")
350+
return nil
354351
}
355352

356353
func (s *Service) startFromExecutionChain() error {

0 commit comments

Comments
 (0)