diff options
author | Sam Truzjan <pxqr.sta@gmail.com> | 2014-04-26 07:26:36 +0400 |
---|---|---|
committer | Sam Truzjan <pxqr.sta@gmail.com> | 2014-04-26 07:26:36 +0400 |
commit | 55d59c4857dee7e2ab091405e79854c944c7e7e3 (patch) | |
tree | 92ddc89ea3d2d139cab901be232caa5436c0ae42 /tests/Network/BitTorrent/Exchange | |
parent | dab822160dbd0b9d4581c13d19f0efb9addc2db6 (diff) |
Bump conduit dependency
Diffstat (limited to 'tests/Network/BitTorrent/Exchange')
-rw-r--r-- | tests/Network/BitTorrent/Exchange/DownloadSpec.hs | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/tests/Network/BitTorrent/Exchange/DownloadSpec.hs b/tests/Network/BitTorrent/Exchange/DownloadSpec.hs index a0d40af3..d46f2034 100644 --- a/tests/Network/BitTorrent/Exchange/DownloadSpec.hs +++ b/tests/Network/BitTorrent/Exchange/DownloadSpec.hs | |||
@@ -33,19 +33,7 @@ withUpdates m = do | |||
33 | undefined | 33 | undefined |
34 | 34 | ||
35 | simulateFetch :: InfoDict -> Updates s (Maybe InfoDict) | 35 | simulateFetch :: InfoDict -> Updates s (Maybe InfoDict) |
36 | simulateFetch dict = go | 36 | simulateFetch dict = undefined |
37 | where | ||
38 | blocks = chunkBy metadataPieceSize (BL.toStrict (BE.encode dict)) | ||
39 | packPiece ix = Torrent.Piece ix (blocks !! ix) | ||
40 | ih = idInfoHash dict | ||
41 | |||
42 | go = do | ||
43 | mix <- scheduleBlock undefined undefined | ||
44 | case mix of | ||
45 | Nothing -> return Nothing | ||
46 | Just ix -> do | ||
47 | mdict <- pushBlock undefined (packPiece ix) | ||
48 | maybe go (return . Just) mdict | ||
49 | 37 | ||
50 | spec :: Spec | 38 | spec :: Spec |
51 | spec = do | 39 | spec = do |