prysmaticlabs / prysm

Hidden goroutine GO-E1007
Bug risk
Critical
24 days ago2 years old
Remove the internal goroutine and call the function using 'go'
211
212// PruneBlobsBundleCacheRoutine prunes the blobs bundle cache at 6s mark of the slot.
213func (vs *Server) PruneBlobsBundleCacheRoutine() {
214	go func() {215		clock, err := vs.ClockWaiter.WaitForClock(vs.Ctx)
216		if err != nil {
217			log.WithError(err).Error("PruneBlobsBundleCacheRoutine failed to receive genesis data")
Remove the internal goroutine and call the function using 'go'
 81// Start listening for received indexed attestations and blocks
 82// and perform slashing detection on them.
 83func (s *Service) Start() {
 84	go s.run() // Start functions must be non-blocking. 85}
 86
 87func (s *Service) run() {
Remove the internal goroutine and call the function using 'go'
 65
 66// This routine processes fork choice attestations from the pool to account for validator votes and fork choice.
 67func (s *Service) spawnProcessAttestationsRoutine() {
 68	go func() { 69		_, err := s.clockWaiter.WaitForClock(s.ctx)
 70		if err != nil {
 71			log.WithError(err).Error("spawnProcessAttestationsRoutine failed to receive genesis data")