mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
downloader: attempt span search if <= (+or equal) to maxheaderfetch
Signed-off-by: meows <b5c6@protonmail.com>
This commit is contained in:
parent
db63f1ee42
commit
ca59775e1a
1 changed files with 1 additions and 1 deletions
|
|
@ -753,7 +753,7 @@ func (d *Downloader) findAncestor(p *peerConnection, remoteHeader *types.Header)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only attempt span search if local head is "close" to reported remote
|
// Only attempt span search if local head is "close" to reported remote
|
||||||
if remoteHeight-localHeight < uint64(MaxHeaderFetch) {
|
if remoteHeight-localHeight <= uint64(MaxHeaderFetch) {
|
||||||
a, err := d.findAncestorSpanSearch(p, remoteHeight, localHeight, floor)
|
a, err := d.findAncestorSpanSearch(p, remoteHeight, localHeight, floor)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
if a > localHeight {
|
if a > localHeight {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue