mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 15:37:56 -05:00
Use independent context when updating domain data (#15268)
* Use independent context when updating domain data * Terence's review * don't cancel immediately * fix e2e panic * add new context for roles
This commit is contained in:
@@ -119,7 +119,8 @@ func run(ctx context.Context, v iface.Validator) {
|
||||
|
||||
// Start fetching domain data for the next epoch.
|
||||
if slots.IsEpochEnd(slot) {
|
||||
go v.UpdateDomainDataCaches(slotCtx, slot+1)
|
||||
domainCtx, _ := context.WithDeadline(ctx, deadline)
|
||||
go v.UpdateDomainDataCaches(domainCtx, slot+1)
|
||||
}
|
||||
|
||||
var wg sync.WaitGroup
|
||||
@@ -131,7 +132,10 @@ func run(ctx context.Context, v iface.Validator) {
|
||||
cancel()
|
||||
continue
|
||||
}
|
||||
performRoles(slotCtx, allRoles, v, slot, &wg, span)
|
||||
cancel()
|
||||
// performRoles calls span.End()
|
||||
rolesCtx, _ := context.WithDeadline(ctx, deadline)
|
||||
performRoles(rolesCtx, allRoles, v, slot, &wg, span)
|
||||
case isHealthyAgain := <-healthTracker.HealthUpdates():
|
||||
if isHealthyAgain {
|
||||
headSlot, err = initializeValidatorAndGetHeadSlot(ctx, v)
|
||||
|
||||
Reference in New Issue
Block a user