mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-12 04:30:04 +00:00
Fix fillInMissingBlocks (#11353)
* Fix fillInMissingBlocks Only check that the chain's parent is in forkchoice, rather than it being the finalized checkpoint. Forkchoice anyway guarantees that the chain will be a descendant of the finalized checkpoint. * ensure root is not zero * fix tests Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
parent
c4deb84012
commit
84bc8f3d64
@ -277,7 +277,7 @@ func (s *Service) fillInForkChoiceMissingBlocks(ctx context.Context, blk interfa
|
|||||||
if len(pendingNodes) == 1 {
|
if len(pendingNodes) == 1 {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
if root != s.ensureRootNotZeros(finalized.Root) {
|
if root != s.ensureRootNotZeros(finalized.Root) && !s.ForkChoicer().HasNode(root) {
|
||||||
return errNotDescendantOfFinalized
|
return errNotDescendantOfFinalized
|
||||||
}
|
}
|
||||||
return s.cfg.ForkChoiceStore.InsertOptimisticChain(ctx, pendingNodes)
|
return s.cfg.ForkChoiceStore.InsertOptimisticChain(ctx, pendingNodes)
|
||||||
|
Loading…
Reference in New Issue
Block a user