Skip to content

Commit

Permalink
Merge pull request #206 from maticnetwork/fix-binary-search
Browse files Browse the repository at this point in the history
Include upper bound in binary search
  • Loading branch information
ssandeep authored Oct 14, 2021
2 parents ecc0fb1 + e4eceef commit f020b88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eth/downloader/downloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ func (d *Downloader) findAncestor(p *peerConnection, remoteHeader *types.Header)
return 0, err
}

ancestor, err = d.findAncestorBinarySearch(p, mode, localHeight, floor)
ancestor, err = d.findAncestorBinarySearch(p, mode, localHeight+1, floor)
if err != nil {
return 0, err
}
Expand Down

0 comments on commit f020b88

Please sign in to comment.