eth/downloader: add a test for detecting missing blocks

This commit is contained in:
Péter Szilágyi
2015-05-15 01:56:52 +03:00
parent cd2fb09051
commit 366e9627e8
2 changed files with 24 additions and 8 deletions

View File

@ -2,7 +2,6 @@ package downloader
import (
"errors"
"fmt"
"sync"
"sync/atomic"
"time"
@ -398,8 +397,7 @@ out:
// and all failed throw an error
if d.queue.InFlight() == 0 {
d.queue.Reset()
return fmt.Errorf("%v peers available = %d. total peers = %d. hashes needed = %d", errPeersUnavailable, len(idlePeers), d.peers.Len(), d.queue.Pending())
return errPeersUnavailable
}
} else if d.queue.InFlight() == 0 {