aboutsummaryrefslogtreecommitdiffstats
path: root/eth
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-05-11 23:27:34 +0800
committerobscuren <geffobscura@gmail.com>2015-05-11 23:27:34 +0800
commit48bd48876c02d1a08690b9604df09ef4bcf77838 (patch)
tree2251978416ad615ee8ca5e465a5bf9ed5b74efed /eth
parent21e52efdfed19c4376b830f8ad0e52a9e599f633 (diff)
downloaddexon-48bd48876c02d1a08690b9604df09ef4bcf77838.tar
dexon-48bd48876c02d1a08690b9604df09ef4bcf77838.tar.gz
dexon-48bd48876c02d1a08690b9604df09ef4bcf77838.tar.bz2
dexon-48bd48876c02d1a08690b9604df09ef4bcf77838.tar.lz
dexon-48bd48876c02d1a08690b9604df09ef4bcf77838.tar.xz
dexon-48bd48876c02d1a08690b9604df09ef4bcf77838.tar.zst
dexon-48bd48876c02d1a08690b9604df09ef4bcf77838.zip
eth, eth/downloader: moved pending queue error message to debug
Diffstat (limited to 'eth')
-rw-r--r--eth/downloader/downloader.go4
-rw-r--r--eth/sync.go3
2 files changed, 4 insertions, 3 deletions
diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go
index 4c7ebe646..577152a21 100644
--- a/eth/downloader/downloader.go
+++ b/eth/downloader/downloader.go
@@ -28,7 +28,7 @@ var (
errUnknownPeer = errors.New("peer's unknown or unhealthy")
errBadPeer = errors.New("action from bad peer ignored")
errNoPeers = errors.New("no peers to keep download active")
- errPendingQueue = errors.New("pending items in queue")
+ ErrPendingQueue = errors.New("pending items in queue")
ErrTimeout = errors.New("timeout")
errEmptyHashSet = errors.New("empty hash set by peer")
errPeersUnavailable = errors.New("no peers available or all peers tried for block download process")
@@ -129,7 +129,7 @@ func (d *Downloader) Synchronise(id string, hash common.Hash) error {
// Abort if the queue still contains some leftover data
if _, cached := d.queue.Size(); cached > 0 && d.queue.GetHeadBlock() != nil {
- return errPendingQueue
+ return ErrPendingQueue
}
// Reset the queue and peer set to clean any internal leftover state
d.queue.Reset()
diff --git a/eth/sync.go b/eth/sync.go
index d955eaa50..00b571782 100644
--- a/eth/sync.go
+++ b/eth/sync.go
@@ -98,7 +98,8 @@ func (pm *ProtocolManager) synchronise(peer *peer) {
case downloader.ErrTimeout:
glog.V(logger.Debug).Infof("Removing peer %v due to sync timeout", peer.id)
pm.removePeer(peer)
-
+ case downloader.ErrPendingQueue:
+ glog.V(logger.Debug).Infoln("Synchronisation aborted:", err)
default:
glog.V(logger.Warn).Infof("Synchronisation failed: %v", err)
}