diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-06-15 22:43:37 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-06-15 22:43:37 +0800 |
commit | 263903378b81f4a17ab34f5ad0d3a7ceb2b5dea9 (patch) | |
tree | 730df04d1439ddc089798a9da5b00ab849b95494 /eth/downloader/queue_test.go | |
parent | 6f5c6150b7060b6b2ee68ac95b30f46c5c2c7f90 (diff) | |
parent | aa250e228a7f2eec5d512d05eb042b75e2755d30 (diff) | |
download | dexon-263903378b81f4a17ab34f5ad0d3a7ceb2b5dea9.tar dexon-263903378b81f4a17ab34f5ad0d3a7ceb2b5dea9.tar.gz dexon-263903378b81f4a17ab34f5ad0d3a7ceb2b5dea9.tar.bz2 dexon-263903378b81f4a17ab34f5ad0d3a7ceb2b5dea9.tar.lz dexon-263903378b81f4a17ab34f5ad0d3a7ceb2b5dea9.tar.xz dexon-263903378b81f4a17ab34f5ad0d3a7ceb2b5dea9.tar.zst dexon-263903378b81f4a17ab34f5ad0d3a7ceb2b5dea9.zip |
Merge pull request #1243 from karalabe/instrument-downloader-sync
eth, eth/downloader: separate concerns, clean up test suite
Diffstat (limited to 'eth/downloader/queue_test.go')
-rw-r--r-- | eth/downloader/queue_test.go | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/eth/downloader/queue_test.go b/eth/downloader/queue_test.go deleted file mode 100644 index ee6141f71..000000000 --- a/eth/downloader/queue_test.go +++ /dev/null @@ -1,30 +0,0 @@ -package downloader - -import ( - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "gopkg.in/fatih/set.v0" -) - -func createHashSet(hashes []common.Hash) *set.Set { - hset := set.New() - - for _, hash := range hashes { - hset.Add(hash) - } - - return hset -} - -func createBlocksFromHashSet(hashes *set.Set) []*types.Block { - blocks := make([]*types.Block, hashes.Size()) - - var i int - hashes.Each(func(v interface{}) bool { - blocks[i] = createBlock(i, common.Hash{}, v.(common.Hash)) - i++ - return true - }) - - return blocks -} |