Skip to content

Commit

Permalink
fix: sync: do not include incoming in return of syncFork (filecoin-pr…
Browse files Browse the repository at this point in the history
  • Loading branch information
arajasek authored Dec 19, 2023
1 parent 324748d commit bfc26cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chain/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down

0 comments on commit bfc26cd

Please sign in to comment.