diff options
author | Péter Szilágyi <peterke@gmail.com> | 2015-05-26 17:44:09 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2015-06-05 17:52:48 +0800 |
commit | 94e525ae12bf3455ae434feb83ad834c8dcfa1ad (patch) | |
tree | ebe876afe8359e9014188721c876216cce94bd14 /eth/downloader/downloader.go | |
parent | 067e66b34869402cf7bd0f352dad37bd4200e976 (diff) | |
download | go-tangerine-94e525ae12bf3455ae434feb83ad834c8dcfa1ad.tar go-tangerine-94e525ae12bf3455ae434feb83ad834c8dcfa1ad.tar.gz go-tangerine-94e525ae12bf3455ae434feb83ad834c8dcfa1ad.tar.bz2 go-tangerine-94e525ae12bf3455ae434feb83ad834c8dcfa1ad.tar.lz go-tangerine-94e525ae12bf3455ae434feb83ad834c8dcfa1ad.tar.xz go-tangerine-94e525ae12bf3455ae434feb83ad834c8dcfa1ad.tar.zst go-tangerine-94e525ae12bf3455ae434feb83ad834c8dcfa1ad.zip |
eth, eth/downloader: fix #1098, elevate empty hash errors to peer drops
Diffstat (limited to 'eth/downloader/downloader.go')
-rw-r--r-- | eth/downloader/downloader.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go index d8dbef726..6f1c94a91 100644 --- a/eth/downloader/downloader.go +++ b/eth/downloader/downloader.go @@ -42,7 +42,7 @@ var ( errNoPeers = errors.New("no peers to keep download active") ErrPendingQueue = errors.New("pending items in queue") ErrTimeout = errors.New("timeout") - errEmptyHashSet = errors.New("empty hash set by peer") + ErrEmptyHashSet = errors.New("empty hash set by peer") errPeersUnavailable = errors.New("no peers available or all peers tried for block download process") errAlreadyInPool = errors.New("hash already in pool") ErrInvalidChain = errors.New("retrieved hash chain is invalid") @@ -289,7 +289,7 @@ func (d *Downloader) fetchHashes(p *peer, h common.Hash) error { // Make sure the peer actually gave something valid if len(hashPack.hashes) == 0 { glog.V(logger.Debug).Infof("Peer (%s) responded with empty hash set", active.id) - return errEmptyHashSet + return ErrEmptyHashSet } for _, hash := range hashPack.hashes { if d.banned.Has(hash) { |