summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2018-06-19 12:51:02 -0400
committerAndrew Cady <d@jerkface.net>2018-06-19 12:51:02 -0400
commit12b585d1f712540f70a26095a8c13df554161c47 (patch)
tree49627d973d738482d6427e43bb88a646252036ed /src
parent365e2cb2dbcaae498df036df8b2a96284f9aecf2 (diff)
move debug prints into Dput
Diffstat (limited to 'src')
-rw-r--r--src/Network/Kademlia/Bootstrap.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Network/Kademlia/Bootstrap.hs b/src/Network/Kademlia/Bootstrap.hs
index 93cf08f3..bc8188a7 100644
--- a/src/Network/Kademlia/Bootstrap.hs
+++ b/src/Network/Kademlia/Bootstrap.hs
@@ -39,6 +39,7 @@ import System.Timeout
39import Text.PrettyPrint as PP hiding (($$), (<>)) 39import Text.PrettyPrint as PP hiding (($$), (<>))
40import Text.PrettyPrint.HughesPJClass hiding (($$), (<>)) 40import Text.PrettyPrint.HughesPJClass hiding (($$), (<>))
41import System.IO 41import System.IO
42import DPut
42 43
43import qualified Data.Wrapper.PSQInt as Int 44import qualified Data.Wrapper.PSQInt as Int
44 ;import Data.Wrapper.PSQInt (pattern (:->)) 45 ;import Data.Wrapper.PSQInt (pattern (:->))
@@ -258,7 +259,7 @@ refreshBucket r@BucketRefresher{ refreshSearch = sch
258 _ <- timeout (15*60*1000000) $ do 259 _ <- timeout (15*60*1000000) $ do
259 atomically $ searchIsFinished s >>= check 260 atomically $ searchIsFinished s >>= check
260 atomically $ searchCancel s 261 atomically $ searchCancel s
261 hPutStrLn stderr $ "Finish refresh " ++ show (n,sample) 262 dput XDHT $ "Finish refresh " ++ show (n,sample)
262 now <- getPOSIXTime 263 now <- getPOSIXTime
263 join $ atomically $ onFinishedRefresh r n now 264 join $ atomically $ onFinishedRefresh r n now
264 rcount <- atomically $ do 265 rcount <- atomically $ do
@@ -316,7 +317,7 @@ bootstrap r@BucketRefresher { refreshSearch = sch
316 forM_ ns0 $ \n -> do 317 forM_ ns0 $ \n -> do
317 forkTask g (show $ kademliaLocation (searchSpace sch) n) 318 forkTask g (show $ kademliaLocation (searchSpace sch) n)
318 (void $ ping n) 319 (void $ ping n)
319 hPutStrLn stderr "Finished bootstrap pings." 320 dput XDHT "Finished bootstrap pings."
320 -- Now search our own Id by entering bootstrap mode from non-bootstrap mode. 321 -- Now search our own Id by entering bootstrap mode from non-bootstrap mode.
321 join $ atomically $ do 322 join $ atomically $ do
322 writeTVar bootstrapMode False 323 writeTVar bootstrapMode False