Skip to content

Commit

Permalink
Unlock pending block queue if insertion errors (#11600)
Browse files Browse the repository at this point in the history
* Unlock pending queue if insertion errors

* @saolyn's feedback

Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Nov 2, 2022
1 parent ead329e commit e4b2b1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion beacon-chain/sync/rpc_beacon_blocks_by_root.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ func (s *Service) sendRecentBeaconBlocksRequest(ctx context.Context, blockRoots
return err
}
s.pendingQueueLock.Lock()
defer s.pendingQueueLock.Unlock()
if err := s.insertBlockToPendingQueue(blk.Block().Slot(), blk, blkRoot); err != nil {
return err
}
s.pendingQueueLock.Unlock()
return nil
})
return err
Expand Down

0 comments on commit e4b2b1e

Please sign in to comment.