aboutsummaryrefslogtreecommitdiffstats
path: root/eth/downloader/downloader_test.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2015-06-11 21:11:56 +0800
committerPéter Szilágyi <peterke@gmail.com>2015-06-15 14:22:36 +0800
commit2937903299b9b965eb54a9d5031714d6a7af972e (patch)
treef231924c42cbdaecb3ee37758fcb3ab42dd9db35 /eth/downloader/downloader_test.go
parent66d3dc8690e0aa551e7b35a17006a2135b51c9bd (diff)
downloadgo-tangerine-2937903299b9b965eb54a9d5031714d6a7af972e.tar
go-tangerine-2937903299b9b965eb54a9d5031714d6a7af972e.tar.gz
go-tangerine-2937903299b9b965eb54a9d5031714d6a7af972e.tar.bz2
go-tangerine-2937903299b9b965eb54a9d5031714d6a7af972e.tar.lz
go-tangerine-2937903299b9b965eb54a9d5031714d6a7af972e.tar.xz
go-tangerine-2937903299b9b965eb54a9d5031714d6a7af972e.tar.zst
go-tangerine-2937903299b9b965eb54a9d5031714d6a7af972e.zip
eth/downloader: remove uneeded testing functions
Diffstat (limited to 'eth/downloader/downloader_test.go')
-rw-r--r--eth/downloader/downloader_test.go9
1 files changed, 2 insertions, 7 deletions
diff --git a/eth/downloader/downloader_test.go b/eth/downloader/downloader_test.go
index 5e79c10c9..e7dfbc70b 100644
--- a/eth/downloader/downloader_test.go
+++ b/eth/downloader/downloader_test.go
@@ -214,18 +214,13 @@ func TestBlockTaking(t *testing.T) {
// Tests that an inactive downloader will not accept incoming hashes and blocks.
func TestInactiveDownloader(t *testing.T) {
- // Create a small enough block chain to download and the tester
- targetBlocks := blockCacheLimit - 15
- hashes := createHashes(0, targetBlocks)
- blocks := createBlocksFromHashSet(createHashSet(hashes))
-
tester := newTester(t, nil, nil)
// Check that neither hashes nor blocks are accepted
- if err := tester.downloader.DeliverHashes("bad peer", hashes); err != errNoSyncActive {
+ if err := tester.downloader.DeliverHashes("bad peer", []common.Hash{}); err != errNoSyncActive {
t.Errorf("error mismatch: have %v, want %v", err, errNoSyncActive)
}
- if err := tester.downloader.DeliverBlocks("bad peer", blocks); err != errNoSyncActive {
+ if err := tester.downloader.DeliverBlocks("bad peer", []*types.Block{}); err != errNoSyncActive {
t.Errorf("error mismatch: have %v, want %v", err, errNoSyncActive)
}
}