diff --git a/beacon-chain/sync/pending_attestations_queue.go b/beacon-chain/sync/pending_attestations_queue.go index 2a24800d7f..cf31b82df1 100644 --- a/beacon-chain/sync/pending_attestations_queue.go +++ b/beacon-chain/sync/pending_attestations_queue.go @@ -117,6 +117,9 @@ func (s *Service) processPendingAtts(ctx context.Context) error { // Start with a random peer to query, but choose the first peer in our unsorted list that claims to // have a head slot newer or equal to the pending attestation's target boundary slot. + if len(pids) == 0 { + return nil + } pid := pids[rand.Int()%len(pids)] targetSlot := helpers.SlotToEpoch(attestations[0].Aggregate.Data.Target.Epoch) for _, p := range pids {