Compare commits

...

1 Commits

Author SHA1 Message Date
terence tsao
1dc2b50357 Notify new head use dependent root without lock 2025-04-26 16:04:50 -07:00

View File

@@ -328,7 +328,7 @@ func (s *Service) notifyNewHeadEvent(
newHeadRoot []byte,
) error {
currEpoch := slots.ToEpoch(newHeadSlot)
currentDutyDependentRoot, err := s.DependentRoot(currEpoch)
currentDutyDependentRoot, err := s.cfg.ForkChoiceStore.DependentRoot(currEpoch)
if err != nil {
return errors.Wrap(err, "could not get duty dependent root")
}
@@ -337,7 +337,7 @@ func (s *Service) notifyNewHeadEvent(
}
previousDutyDependentRoot := currentDutyDependentRoot
if currEpoch > 0 {
previousDutyDependentRoot, err = s.DependentRoot(currEpoch.Sub(1))
previousDutyDependentRoot, err = s.cfg.ForkChoiceStore.DependentRoot(currEpoch.Sub(1))
if err != nil {
return errors.Wrap(err, "could not get duty dependent root")
}