summaryrefslogtreecommitdiff
path: root/src/Network
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network')
-rw-r--r--src/Network/BitTorrent/Core/Node.hs2
-rw-r--r--src/Network/BitTorrent/Core/PeerId.hs4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/Network/BitTorrent/Core/Node.hs b/src/Network/BitTorrent/Core/Node.hs
index c629df08..a1a87135 100644
--- a/src/Network/BitTorrent/Core/Node.hs
+++ b/src/Network/BitTorrent/Core/Node.hs
@@ -37,7 +37,7 @@ import Network.BitTorrent.Core.PeerAddr ()
37-- | Normally, /this/ node id should we saved between invocations of 37-- | Normally, /this/ node id should we saved between invocations of
38-- the client software. 38-- the client software.
39newtype NodeId = NodeId ByteString 39newtype NodeId = NodeId ByteString
40 deriving (Show, Eq, Ord, FromJSON, ToJSON) 40 deriving (Show, Eq, Ord, BEncode, FromJSON, ToJSON)
41 41
42nodeIdSize :: Int 42nodeIdSize :: Int
43nodeIdSize = 20 43nodeIdSize = 20
diff --git a/src/Network/BitTorrent/Core/PeerId.hs b/src/Network/BitTorrent/Core/PeerId.hs
index f30308d4..cab30331 100644
--- a/src/Network/BitTorrent/Core/PeerId.hs
+++ b/src/Network/BitTorrent/Core/PeerId.hs
@@ -305,7 +305,7 @@ fingerprint pid = either (const def) id $ runGet getCI (getPeerId pid)
305 'e' -> Fingerprint <$> getBitCometImpl <*> getBitCometVersion 305 'e' -> Fingerprint <$> getBitCometImpl <*> getBitCometVersion
306 'F' -> Fingerprint <$> getBitCometImpl <*> getBitCometVersion 306 'F' -> Fingerprint <$> getBitCometImpl <*> getBitCometVersion
307 c -> do 307 c -> do
308 c1 <- w2c <$> lookAhead getWord8 308 c1 <- w2c <$> S.lookAhead getWord8
309 if c1 == 'P' 309 if c1 == 'P'
310 then do 310 then do
311 _ <- getWord8 311 _ <- getWord8
@@ -324,7 +324,7 @@ fingerprint pid = either (const def) id $ runGet getCI (getPeerId pid)
324 324
325 getBitCometImpl = do 325 getBitCometImpl = do
326 bs <- getByteString 3 326 bs <- getByteString 3
327 lookAhead $ do 327 S.lookAhead $ do
328 _ <- getByteString 2 328 _ <- getByteString 2
329 lr <- getByteString 4 329 lr <- getByteString 4
330 return $ 330 return $