Skip to content

Commit

Permalink
pinned sync
Browse files Browse the repository at this point in the history
  • Loading branch information
tbenr committed Feb 25, 2025
1 parent 17a68b3 commit 08aa980
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ public CommonAncestor(final RecentChainData recentChainData, final Optional<UInt

public SafeFuture<UInt64> getCommonAncestor(
final SyncSource peer, final UInt64 firstNonFinalSlot, final UInt64 peerHeadSlot) {
if (pinnedCommonAncestorSlot.isPresent()) {
if (pinnedCommonAncestorSlot
.map(slot -> slot.equals(recentChainData.getHeadSlot()))
.orElse(false)) {
return getCommonAncestorFromPinned(peer);
}

Expand Down

0 comments on commit 08aa980

Please sign in to comment.