Fix Update Of Committee Cache (#12668)

* fix it

* sammy's comment

* fix tests

---------

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
Nishant Das
2023-07-28 21:34:03 +08:00
committed by GitHub
parent 493905ee9e
commit db450f53a4
3 changed files with 39 additions and 41 deletions

View File

@@ -345,6 +345,9 @@ func (s *Service) updateEpochBoundaryCaches(ctx context.Context, st state.Beacon
// with a custom deadline, therefore using the background context instead.
slotCtx, cancel := context.WithTimeout(context.Background(), slotDeadline)
defer cancel()
if err := helpers.UpdateCommitteeCache(ctx, st, e+1); err != nil {
log.WithError(err).Warn("Could not update committee cache")
}
if err := helpers.UpdateProposerIndicesInCache(slotCtx, st, e+1); err != nil {
log.WithError(err).Warn("Failed to cache next epoch proposers")
}