From b5f222ba7dfa1fa53b8b53f4e1b770193bb55fe4 Mon Sep 17 00:00:00 2001 From: Sam Truzjan Date: Mon, 14 Oct 2013 05:11:46 +0400 Subject: Move some modules from torrent-content --- src/Network/BitTorrent/DHT/Protocol.hs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/Network/BitTorrent/DHT') diff --git a/src/Network/BitTorrent/DHT/Protocol.hs b/src/Network/BitTorrent/DHT/Protocol.hs index 73e5fa68..0ac814b7 100644 --- a/src/Network/BitTorrent/DHT/Protocol.hs +++ b/src/Network/BitTorrent/DHT/Protocol.hs @@ -42,7 +42,7 @@ import Network.BitTorrent.Exchange.Protocol () type NodeId = ByteString --- WARN is the 'system' random suitable for this? +-- TODO WARN is the 'system' random suitable for this? -- | Generate random NodeID used for the entire session. -- Distribution of ID's should be as uniform as possible. -- @@ -56,9 +56,7 @@ data NodeAddr = NodeAddr { instance Serialize NodeAddr where get = NodeAddr <$> getWord32be <*> get - put NodeAddr {..} = do - putWord32be nodeIP - put nodePort + put NodeAddr {..} = putWord32be nodeIP >> put nodePort data NodeInfo = NodeInfo { nodeID :: !NodeId -- cgit v1.2.3