mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 15:37:56 -05:00
Check Block Before Processing it (#4527)
* fix panic * Update beacon-chain/sync/pending_blocks_queue.go
This commit is contained in:
committed by
prylabs-bulldozer[bot]
parent
de2f1fbf5c
commit
e286069b20
@@ -51,6 +51,10 @@ func (r *Service) processPendingBlocks(ctx context.Context) error {
|
||||
|
||||
r.pendingQueueLock.RLock()
|
||||
b := r.slotToPendingBlocks[uint64(s)]
|
||||
// Skip if block does not exist.
|
||||
if b == nil || b.Block == nil {
|
||||
continue
|
||||
}
|
||||
inPendingQueue := r.seenPendingBlocks[bytesutil.ToBytes32(b.Block.ParentRoot)]
|
||||
r.pendingQueueLock.RUnlock()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user