exit blob fetching for cp block if outside retention (#13686)

* exit blob fetching for cp block if outside retention

* regression test

---------

Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
This commit is contained in:
kasey
2024-03-04 20:57:06 -06:00
committed by GitHub
parent d6fb8c29c9
commit b3caaa9acc
3 changed files with 28 additions and 0 deletions

View File

@@ -316,6 +316,9 @@ func (s *Service) fetchOriginBlobs(pids []peer.ID) error {
log.WithField("root", fmt.Sprintf("%#x", r)).Error("Block for checkpoint sync origin root not found in db")
return err
}
if !params.WithinDAPeriod(slots.ToEpoch(blk.Block().Slot()), slots.ToEpoch(s.clock.CurrentSlot())) {
return nil
}
rob, err := blocks.NewROBlockWithRoot(blk, r)
if err != nil {
return err