bytesDownloaded :: PieceMap -> Integer
bytesDownloaded =
- sum . (map (len . snd)) . toList . filter (\v -> dlstate v == Have)
+ sum . map (len . snd) . toList . filter (\v -> dlstate v == Have)
updatePieceAvailability :: PieceMap -> Peer -> [Integer] -> PieceMap
updatePieceAvailability pieceStatus p pieceList =
tracker peer_id = do
m <- ask
let args = mkArgs peer_id m
- liftIO $ get (head . announceList $ m) $ args
+ liftIO $ get (head . announceList $ m) args
getTrackerResponse :: String -> ReaderT Metainfo IO (Either ByteString TrackerResponse)
getTrackerResponse peerId = do