diff options
Diffstat (limited to 'dex')
-rw-r--r-- | dex/downloader/downloader.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dex/downloader/downloader.go b/dex/downloader/downloader.go index 9d609584b..0847cd062 100644 --- a/dex/downloader/downloader.go +++ b/dex/downloader/downloader.go @@ -848,7 +848,7 @@ func (d *Downloader) findAncestor(p *peerConnection, remoteHeader *types.Header) default: known = d.lightchain.HasHeader(h, n) } - if known { + if n <= localHeight && known { number, hash = n, h break } @@ -919,7 +919,7 @@ func (d *Downloader) findAncestor(p *peerConnection, remoteHeader *types.Header) default: known = d.lightchain.HasHeader(h, n) } - if !known { + if !known || n > localHeight { end = check break } |