diff options
author | Sam Truzjan <pxqr.sta@gmail.com> | 2014-04-04 21:44:18 +0400 |
---|---|---|
committer | Sam Truzjan <pxqr.sta@gmail.com> | 2014-04-04 21:44:18 +0400 |
commit | 052bed30a3d83aa8fb7b8b42509ad96f573439af (patch) | |
tree | 106b44c06226595870c3bf54f890824eec2b7f0e /tests/Network/BitTorrent/Exchange | |
parent | 88ef120511caae5ed74a48a87617b43aec4b7f76 (diff) |
Move HashList to Torrent module
Diffstat (limited to 'tests/Network/BitTorrent/Exchange')
-rw-r--r-- | tests/Network/BitTorrent/Exchange/Session/MetadataSpec.hs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/Network/BitTorrent/Exchange/Session/MetadataSpec.hs b/tests/Network/BitTorrent/Exchange/Session/MetadataSpec.hs index 975ceb5b..5392d74b 100644 --- a/tests/Network/BitTorrent/Exchange/Session/MetadataSpec.hs +++ b/tests/Network/BitTorrent/Exchange/Session/MetadataSpec.hs | |||
@@ -7,8 +7,7 @@ import Test.Hspec | |||
7 | import Test.QuickCheck | 7 | import Test.QuickCheck |
8 | 8 | ||
9 | import Data.BEncode as BE | 9 | import Data.BEncode as BE |
10 | import Data.Torrent | 10 | import Data.Torrent as Torrent |
11 | import Data.Torrent.Piece as P | ||
12 | import Network.BitTorrent.Core | 11 | import Network.BitTorrent.Core |
13 | import Network.BitTorrent.Exchange.Message | 12 | import Network.BitTorrent.Exchange.Message |
14 | import Network.BitTorrent.Exchange.Session.Metadata | 13 | import Network.BitTorrent.Exchange.Session.Metadata |
@@ -36,7 +35,7 @@ simulateFetch :: InfoDict -> Updates (Maybe InfoDict) | |||
36 | simulateFetch dict = go | 35 | simulateFetch dict = go |
37 | where | 36 | where |
38 | blocks = chunkBy metadataPieceSize (BL.toStrict (BE.encode dict)) | 37 | blocks = chunkBy metadataPieceSize (BL.toStrict (BE.encode dict)) |
39 | packPiece ix = P.Piece ix (blocks !! ix) | 38 | packPiece ix = Torrent.Piece ix (blocks !! ix) |
40 | ih = idInfoHash dict | 39 | ih = idInfoHash dict |
41 | 40 | ||
42 | go = do | 41 | go = do |