From bfc26cdc184c9c1f4dd8d9c7d8a8dea912aeb03b Mon Sep 17 00:00:00 2001 From: Aayush Rajasekaran Date: Tue, 19 Dec 2023 16:39:52 -0500 Subject: [PATCH] fix: sync: do not include incoming in return of syncFork (#11541) --- chain/sync.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chain/sync.go b/chain/sync.go index c61c9f31094..4dccc20365a 100644 --- a/chain/sync.go +++ b/chain/sync.go @@ -896,7 +896,7 @@ func (syncer *Syncer) syncFork(ctx context.Context, incoming *types.TipSet, know if commonParent { // known contains at least one of incoming's Parents => the common ancestor is known's Parents (incoming's Grandparents) - // in this case, we need to return {incoming, incoming.Parents()} + // in this case, we need to return {incoming.Parents()} incomingParents, err := syncer.store.LoadTipSet(ctx, incomingParentsTsk) if err != nil { // fallback onto the network @@ -912,7 +912,7 @@ func (syncer *Syncer) syncFork(ctx context.Context, incoming *types.TipSet, know incomingParents = tips[0] } - return []*types.TipSet{incoming, incomingParents}, nil + return []*types.TipSet{incomingParents}, nil } // TODO: Does this mean we always ask for ForkLengthThreshold blocks from the network, even if we just need, like, 2? Yes.