diff options
author | obscuren <geffobscura@gmail.com> | 2015-04-19 05:56:08 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-04-19 05:56:08 +0800 |
commit | 50e096e627c8c07b4dda3a7221dda5f32dc5c5cb (patch) | |
tree | dd4d24e45e14ce075db255849a35e82259f43ba8 /eth/downloader/downloader.go | |
parent | 03b4cf74a2d2ce2f1ff39f0354b9577425e6524e (diff) | |
download | go-tangerine-50e096e627c8c07b4dda3a7221dda5f32dc5c5cb.tar go-tangerine-50e096e627c8c07b4dda3a7221dda5f32dc5c5cb.tar.gz go-tangerine-50e096e627c8c07b4dda3a7221dda5f32dc5c5cb.tar.bz2 go-tangerine-50e096e627c8c07b4dda3a7221dda5f32dc5c5cb.tar.lz go-tangerine-50e096e627c8c07b4dda3a7221dda5f32dc5c5cb.tar.xz go-tangerine-50e096e627c8c07b4dda3a7221dda5f32dc5c5cb.tar.zst go-tangerine-50e096e627c8c07b4dda3a7221dda5f32dc5c5cb.zip |
downloader: don't remove peers. keep them around
Diffstat (limited to 'eth/downloader/downloader.go')
-rw-r--r-- | eth/downloader/downloader.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go index 2f98a1414..8f955b483 100644 --- a/eth/downloader/downloader.go +++ b/eth/downloader/downloader.go @@ -176,6 +176,7 @@ out: var peer *peer = sync.peer err := d.getFromPeer(peer, sync.hash, sync.ignoreInitial) if err != nil { + glog.V(logger.Detail).Infoln(err) break } @@ -301,7 +302,7 @@ out: d.queue.reset() d.peers.reset() - return errPeersUnavailable + return fmt.Errorf("%v avaialable = %d. total = %d", errPeersUnavailable, len(availablePeers), len(d.peers)) } } else if len(d.queue.fetching) == 0 { @@ -321,7 +322,7 @@ out: if time.Since(chunk.itime) > blockTtl { badPeers = append(badPeers, pid) // remove peer as good peer from peer list - d.UnregisterPeer(pid) + //d.UnregisterPeer(pid) } } d.queue.mu.Unlock() |