Fix: use correct context for UpdateCommitteeCache (#12691)

This commit is contained in:
terencechain 2023-08-02 23:00:58 -07:00 committed by GitHub
parent d38762772a
commit dbc17cf2ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -346,7 +346,7 @@ 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 {
if err := helpers.UpdateCommitteeCache(slotCtx, st, e+1); err != nil {
log.WithError(err).Warn("Could not update committee cache")
}
if err := helpers.UpdateProposerIndicesInCache(slotCtx, st, e+1); err != nil {