Skip to content

Commit

Permalink
do not set subjHead in bifurcation due to adj check
Browse files Browse the repository at this point in the history
  • Loading branch information
cristaloleg committed Jan 22, 2025
1 parent 64e7be5 commit 671a7df
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions sync/sync_head.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,7 @@ func (s *Syncer[H]) verify(ctx context.Context, newHead H) (bool, error) {
"hash_of_subjective", sbjHead.Hash(),
"reason", verErr.Reason)
}

return false, err
return verErr.SoftFailure, err
}

// verifyBifurcating verifies networkHead against subjHead via the interim headers when direct
Expand Down Expand Up @@ -231,7 +230,6 @@ func (s *Syncer[H]) verifyBifurcating(ctx context.Context, subjHead, networkHead

// candidate was validated properly, update subjHead.
subjHead = candidateHeader
s.setSubjectiveHead(ctx, subjHead)

if err := header.Verify(subjHead, networkHead); err == nil {
// network head validate properly, return success.
Expand Down

0 comments on commit 671a7df

Please sign in to comment.