aboutsummaryrefslogtreecommitdiffstats
path: root/eth/downloader/downloader_test.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2015-05-08 20:22:48 +0800
committerPéter Szilágyi <peterke@gmail.com>2015-05-08 20:22:48 +0800
commitbd5720f4804788d91154a10ef5bb10425c502658 (patch)
treed8914c112f86404314060e6d04029fe212c50ac0 /eth/downloader/downloader_test.go
parent9d188f73b58ee1fe4bda00a9536bda4056755f2c (diff)
downloadgo-tangerine-bd5720f4804788d91154a10ef5bb10425c502658.tar
go-tangerine-bd5720f4804788d91154a10ef5bb10425c502658.tar.gz
go-tangerine-bd5720f4804788d91154a10ef5bb10425c502658.tar.bz2
go-tangerine-bd5720f4804788d91154a10ef5bb10425c502658.tar.lz
go-tangerine-bd5720f4804788d91154a10ef5bb10425c502658.tar.xz
go-tangerine-bd5720f4804788d91154a10ef5bb10425c502658.tar.zst
go-tangerine-bd5720f4804788d91154a10ef5bb10425c502658.zip
eth, eth/downloader: handle sync errors a bit more gracefully
Diffstat (limited to 'eth/downloader/downloader_test.go')
-rw-r--r--eth/downloader/downloader_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/eth/downloader/downloader_test.go b/eth/downloader/downloader_test.go
index f3402794b..8ccc4d1a5 100644
--- a/eth/downloader/downloader_test.go
+++ b/eth/downloader/downloader_test.go
@@ -61,7 +61,7 @@ func newTester(t *testing.T, hashes []common.Hash, blocks map[common.Hash]*types
func (dl *downloadTester) sync(peerId string, hash common.Hash) error {
dl.activePeerId = peerId
- return dl.downloader.Synchronize(peerId, hash)
+ return dl.downloader.Synchronise(peerId, hash)
}
func (dl *downloadTester) hasBlock(hash common.Hash) bool {
@@ -217,13 +217,13 @@ func TestThrottling(t *testing.T) {
}
}()
- // Synchronize the two threads and verify
+ // Synchronise the two threads and verify
err := <-errc
done <- struct{}{}
<-done
if err != nil {
- t.Fatalf("failed to synchronize blocks: %v", err)
+ t.Fatalf("failed to synchronise blocks: %v", err)
}
if len(took) != targetBlocks {
t.Fatalf("downloaded block mismatch: have %v, want %v", len(took), targetBlocks)