@@ -733,7 +733,11 @@ proc updatePeer(overseer: SyncOverseerRef2, peer: Peer) =
733733 Opt .some (hentry.blockId.root)
734734 else :
735735 # Parent is present, so we searching for first missing one.
736- getPendingParentRoot (hentry)
736+ let root = getPendingParentRoot (hentry)
737+ if root.isSome () and (root.get () == GenesisCheckpoint .root):
738+ Opt .none (Eth2Digest )
739+ else :
740+ root
737741 missingFinalizedRoot =
738742 if not (isNil (fentry)) and (DagEntryFlag .Pending in fentry.flags):
739743 # Missing parent situation
@@ -810,13 +814,9 @@ proc updatePeer(
810814 blck: ref ForkedSignedBeaconBlock ,
811815 missingSidecars: bool
812816) =
813- let
814- parentRoot =
815- withBlck (blck[]):
816- forkyBlck.message.parent_root
817- slot = blck[].slot
818- root = blck[].root
819-
817+ let (slot, root, parentRoot) =
818+ withBlck (blck[]):
819+ (forkyBlck.message.slot, forkyBlck.root, forkyBlck.message.parent_root)
820820 overseer.updatePeer (
821821 peerId, peerMustPresent, slot, root, parentRoot, missingSidecars)
822822
@@ -827,12 +827,9 @@ proc updatePeer(
827827 blck: ForkedSignedBeaconBlock ,
828828 missingSidecars: bool
829829) =
830- let
831- parentRoot =
832- withBlck (blck):
833- forkyBlck.message.parent_root
834- slot = blck.slot
835- root = blck.root
830+ let (slot, root, parentRoot) =
831+ withBlck (blck):
832+ (forkyBlck.message.slot, forkyBlck.root, forkyBlck.message.parent_root)
836833 overseer.updatePeer (
837834 peerId, peerMustPresent, slot, root, parentRoot, missingSidecars)
838835
0 commit comments