aboutsummaryrefslogtreecommitdiffstats
path: root/eth/downloader/downloader_test.go
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-05-13 18:46:29 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-05-13 18:46:29 +0800
commit7cb0e242450fd15c6ee8f5d70af41504a047e0aa (patch)
tree78a0226189f77ff05f73b773dbdcfd0a8e077d72 /eth/downloader/downloader_test.go
parent6dec90464dc2a263a5bcb72fdbff6c5439fb07dc (diff)
parentd2d5dbc6fbdb613a0c5b1967ee82a74cd94739a3 (diff)
downloadgo-tangerine-7cb0e242450fd15c6ee8f5d70af41504a047e0aa.tar
go-tangerine-7cb0e242450fd15c6ee8f5d70af41504a047e0aa.tar.gz
go-tangerine-7cb0e242450fd15c6ee8f5d70af41504a047e0aa.tar.bz2
go-tangerine-7cb0e242450fd15c6ee8f5d70af41504a047e0aa.tar.lz
go-tangerine-7cb0e242450fd15c6ee8f5d70af41504a047e0aa.tar.xz
go-tangerine-7cb0e242450fd15c6ee8f5d70af41504a047e0aa.tar.zst
go-tangerine-7cb0e242450fd15c6ee8f5d70af41504a047e0aa.zip
Merge pull request #948 from karalabe/fix-downlaoder-activepeer-shadow
eth/downloader: fix active peer shadowing, polish func names
Diffstat (limited to 'eth/downloader/downloader_test.go')
-rw-r--r--eth/downloader/downloader_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/eth/downloader/downloader_test.go b/eth/downloader/downloader_test.go
index 385ad2909..78eff011a 100644
--- a/eth/downloader/downloader_test.go
+++ b/eth/downloader/downloader_test.go
@@ -76,7 +76,7 @@ func (dl *downloadTester) getBlock(hash common.Hash) *types.Block {
}
func (dl *downloadTester) getHashes(hash common.Hash) error {
- dl.downloader.AddHashes(dl.activePeerId, dl.hashes)
+ dl.downloader.DeliverHashes(dl.activePeerId, dl.hashes)
return nil
}
@@ -87,7 +87,7 @@ func (dl *downloadTester) getBlocks(id string) func([]common.Hash) error {
blocks[i] = dl.blocks[hash]
}
- go dl.downloader.DeliverChunk(id, blocks)
+ go dl.downloader.DeliverBlocks(id, blocks)
return nil
}
@@ -188,12 +188,12 @@ func TestInactiveDownloader(t *testing.T) {
blocks := createBlocksFromHashSet(createHashSet(hashes))
tester := newTester(t, hashes, nil)
- err := tester.downloader.AddHashes("bad peer 001", hashes)
+ err := tester.downloader.DeliverHashes("bad peer 001", hashes)
if err != errNoSyncActive {
t.Error("expected no sync error, got", err)
}
- err = tester.downloader.DeliverChunk("bad peer 001", blocks)
+ err = tester.downloader.DeliverBlocks("bad peer 001", blocks)
if err != errNoSyncActive {
t.Error("expected no sync error, got", err)
}