diff options
Diffstat (limited to 'exsamples/Main.hs')
-rw-r--r-- | exsamples/Main.hs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/exsamples/Main.hs b/exsamples/Main.hs index a094b87a..2c879378 100644 --- a/exsamples/Main.hs +++ b/exsamples/Main.hs | |||
@@ -15,12 +15,12 @@ main = do | |||
15 | [path] <- getArgs | 15 | [path] <- getArgs |
16 | torrent <- fromFile path | 16 | torrent <- fromFile path |
17 | 17 | ||
18 | client <- newClient [] | 18 | client <- newClient 1 [] |
19 | swarm <- newLeacher client torrent | 19 | swarm <- newLeacher client torrent |
20 | 20 | ||
21 | ref <- newIORef 0 | ||
22 | |||
23 | discover swarm $ do | 21 | discover swarm $ do |
22 | ref <- liftIO $ newIORef 0 | ||
23 | |||
24 | addr <- asks connectedPeerAddr | 24 | addr <- asks connectedPeerAddr |
25 | liftIO $ print $ "connected to" ++ show addr | 25 | liftIO $ print $ "connected to" ++ show addr |
26 | 26 | ||
@@ -36,7 +36,6 @@ main = do | |||
36 | liftIO $ do | 36 | liftIO $ do |
37 | readIORef ref >>= print | 37 | readIORef ref >>= print |
38 | modifyIORef ref succ | 38 | modifyIORef ref succ |
39 | print (ppBlock blk) | ||
40 | 39 | ||
41 | yieldEvent (Want (BlockIx 0 0 (16 * 1024))) | 40 | yieldEvent (Want (BlockIx 0 0 (16 * 1024))) |
42 | 41 | ||