mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 21:07:18 +00:00
Pubsub: Ignore block already in database (#4721)
* Ignore block already in database * Merge refs/heads/master into skip-block-already-in-db
This commit is contained in:
parent
05876d6250
commit
397b7d807a
@ -39,6 +39,10 @@ func (r *Service) beaconBlockSubscriber(ctx context.Context, msg proto.Message)
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if r.db.HasBlock(ctx, blockRoot) {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
// Handle block when the parent is unknown
|
// Handle block when the parent is unknown
|
||||||
if !r.db.HasBlock(ctx, bytesutil.ToBytes32(block.ParentRoot)) {
|
if !r.db.HasBlock(ctx, bytesutil.ToBytes32(block.ParentRoot)) {
|
||||||
r.pendingQueueLock.Lock()
|
r.pendingQueueLock.Lock()
|
||||||
|
Loading…
Reference in New Issue
Block a user