From fe6cb6e8a5de55406ad3663cf5c0a0d73189a519 Mon Sep 17 00:00:00 2001 From: Sam Truzjan Date: Sat, 28 Dec 2013 05:46:05 +0400 Subject: Remove unused node list serialization --- src/Network/BitTorrent/Core/Node.hs | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) (limited to 'src') diff --git a/src/Network/BitTorrent/Core/Node.hs b/src/Network/BitTorrent/Core/Node.hs index f163a895..9501d59e 100644 --- a/src/Network/BitTorrent/Core/Node.hs +++ b/src/Network/BitTorrent/Core/Node.hs @@ -109,7 +109,7 @@ genNodeId = NodeId <$> getEntropy nodeIdSize data NodeAddr a = NodeAddr { nodeHost :: !a , nodePort :: {-# UNPACK #-} !PortNumber - } deriving (Show, Eq) + } deriving (Show, Eq, Typeable) $(deriveJSON omitRecordPrefix ''NodeAddr) @@ -165,20 +165,3 @@ instance Eq a => Ord (NodeInfo a) where instance Serialize a => Serialize (NodeInfo a) where get = NodeInfo <$> get <*> get put NodeInfo {..} = put nodeId >> put nodeAddr -{- -type CompactInfo = ByteString - -data NodeList a = CompactNodeList [NodeInfo a] - -decodeCompact :: Serialize a => CompactInfo -> [NodeInfo a] -decodeCompact = either (const []) id . S.runGet (many get) - -encodeCompact :: [NodeId] -> CompactInfo -encodeCompact = S.runPut . mapM_ put - ---decodePeerList :: [BEncode] -> [PeerAddr] ---decodePeerList = undefined - ---encodePeerList :: [PeerAddr] -> [BEncode] ---encodePeerList = undefined --} \ No newline at end of file -- cgit v1.2.3