diff options
Diffstat (limited to 'examples/GetTorrent.hs')
-rw-r--r-- | examples/GetTorrent.hs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/examples/GetTorrent.hs b/examples/GetTorrent.hs index 5e624fa1..db52263d 100644 --- a/examples/GetTorrent.hs +++ b/examples/GetTorrent.hs | |||
@@ -52,9 +52,6 @@ programInfo = info (helper <*> paramsParser) | |||
52 | <> header "gettorrent - get torrent file by infohash" | 52 | <> header "gettorrent - get torrent file by infohash" |
53 | ) | 53 | ) |
54 | 54 | ||
55 | fakeTracker :: URI | ||
56 | fakeTracker = fromJust $ parseURI "http://foo.org" | ||
57 | |||
58 | exchangeTorrent :: PeerAddr IP -> InfoHash -> IO InfoDict | 55 | exchangeTorrent :: PeerAddr IP -> InfoHash -> IO InfoDict |
59 | exchangeTorrent addr ih = do | 56 | exchangeTorrent addr ih = do |
60 | pid <- genPeerId | 57 | pid <- genPeerId |
@@ -72,7 +69,7 @@ getTorrent Params {..} = do | |||
72 | DHT.lookup topic $$ C.mapM_ $ \ peers -> do | 69 | DHT.lookup topic $$ C.mapM_ $ \ peers -> do |
73 | liftIO $ forM_ peers $ \ peer -> do | 70 | liftIO $ forM_ peers $ \ peer -> do |
74 | infodict <- exchangeTorrent (IPv4 <$> peer) topic | 71 | infodict <- exchangeTorrent (IPv4 <$> peer) topic |
75 | let torrent = nullTorrent fakeTracker infodict | 72 | let torrent = nullTorrent infodict -- TODO add tNodes, tCreated, etc? |
76 | toFile (show topic <.> torrentExt) torrent | 73 | toFile (show topic <.> torrentExt) torrent |
77 | exitSuccess | 74 | exitSuccess |
78 | 75 | ||