eth, eth/downloader: moved pending queue error message to debug
This commit is contained in:
parent
21e52efdfe
commit
48bd48876c
|
@ -28,7 +28,7 @@ var (
|
||||||
errUnknownPeer = errors.New("peer's unknown or unhealthy")
|
errUnknownPeer = errors.New("peer's unknown or unhealthy")
|
||||||
errBadPeer = errors.New("action from bad peer ignored")
|
errBadPeer = errors.New("action from bad peer ignored")
|
||||||
errNoPeers = errors.New("no peers to keep download active")
|
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")
|
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")
|
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
|
// Abort if the queue still contains some leftover data
|
||||||
if _, cached := d.queue.Size(); cached > 0 && d.queue.GetHeadBlock() != nil {
|
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
|
// Reset the queue and peer set to clean any internal leftover state
|
||||||
d.queue.Reset()
|
d.queue.Reset()
|
||||||
|
|
|
@ -98,7 +98,8 @@ func (pm *ProtocolManager) synchronise(peer *peer) {
|
||||||
case downloader.ErrTimeout:
|
case downloader.ErrTimeout:
|
||||||
glog.V(logger.Debug).Infof("Removing peer %v due to sync timeout", peer.id)
|
glog.V(logger.Debug).Infof("Removing peer %v due to sync timeout", peer.id)
|
||||||
pm.removePeer(peer)
|
pm.removePeer(peer)
|
||||||
|
case downloader.ErrPendingQueue:
|
||||||
|
glog.V(logger.Debug).Infoln("Synchronisation aborted:", err)
|
||||||
default:
|
default:
|
||||||
glog.V(logger.Warn).Infof("Synchronisation failed: %v", err)
|
glog.V(logger.Warn).Infof("Synchronisation failed: %v", err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue