diff options
author | Péter Szilágyi <peterke@gmail.com> | 2015-05-11 19:26:20 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2015-05-11 19:26:20 +0800 |
commit | 685862d2ce32294aacb2455bf189ec8e5c4efce3 (patch) | |
tree | 4ac31deffa46d5dff3a704b0594059e8757abca7 /eth/downloader/downloader_test.go | |
parent | 00280e62e3c422b2824a0280015b7b78578ab16d (diff) | |
download | dexon-685862d2ce32294aacb2455bf189ec8e5c4efce3.tar dexon-685862d2ce32294aacb2455bf189ec8e5c4efce3.tar.gz dexon-685862d2ce32294aacb2455bf189ec8e5c4efce3.tar.bz2 dexon-685862d2ce32294aacb2455bf189ec8e5c4efce3.tar.lz dexon-685862d2ce32294aacb2455bf189ec8e5c4efce3.tar.xz dexon-685862d2ce32294aacb2455bf189ec8e5c4efce3.tar.zst dexon-685862d2ce32294aacb2455bf189ec8e5c4efce3.zip |
eth/downloader: fix #910, thread safe peers & polishes
Diffstat (limited to 'eth/downloader/downloader_test.go')
-rw-r--r-- | eth/downloader/downloader_test.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/eth/downloader/downloader_test.go b/eth/downloader/downloader_test.go index d0f8d4c8f..385ad2909 100644 --- a/eth/downloader/downloader_test.go +++ b/eth/downloader/downloader_test.go @@ -229,7 +229,7 @@ func TestThrottling(t *testing.T) { minDesiredPeerCount = 4 blockTtl = 1 * time.Second - targetBlocks := 4 * blockCacheLimit + targetBlocks := 16 * blockCacheLimit hashes := createHashes(0, targetBlocks) blocks := createBlocksFromHashes(hashes) tester := newTester(t, hashes, blocks) @@ -256,6 +256,7 @@ func TestThrottling(t *testing.T) { return default: took = append(took, tester.downloader.TakeBlocks()...) + time.Sleep(time.Millisecond) } } }() |