Merge pull request #202 from maticnetwork/feature-hot-fix-memory

Limit binary search to local height
This commit is contained in:
Sandeep Sreenath 2021-10-08 15:20:53 +05:30 committed by GitHub
commit 12c2a3f907
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -815,7 +815,7 @@ func (d *Downloader) findAncestor(p *peerConnection, remoteHeader *types.Header)
return 0, err
}
ancestor, err = d.findAncestorBinarySearch(p, mode, remoteHeight, floor)
ancestor, err = d.findAncestorBinarySearch(p, mode, localHeight, floor)
if err != nil {
return 0, err
}