summaryrefslogtreecommitdiff
path: root/src/Network
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network')
-rw-r--r--src/Network/BitTorrent/DHT/Routing.hs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/Network/BitTorrent/DHT/Routing.hs b/src/Network/BitTorrent/DHT/Routing.hs
index ba1f6799..8705a5a2 100644
--- a/src/Network/BitTorrent/DHT/Routing.hs
+++ b/src/Network/BitTorrent/DHT/Routing.hs
@@ -365,9 +365,7 @@ type NodeCount = Int
365-- | Internally, routing table is similar to list of buckets or a 365-- | Internally, routing table is similar to list of buckets or a
366-- /matrix/ of nodes. This function returns the shape of the matrix. 366-- /matrix/ of nodes. This function returns the shape of the matrix.
367shape :: Table ip -> [BucketSize] 367shape :: Table ip -> [BucketSize]
368shape (Tip _ _ bucket) = [PSQ.size bucket] 368shape = map PSQ.size . toBucketList
369shape (Zero t bucket) = PSQ.size bucket : shape t
370shape (One bucket t ) = PSQ.size bucket : shape t
371 369
372-- | Get number of nodes in the table. 370-- | Get number of nodes in the table.
373size :: Table ip -> NodeCount 371size :: Table ip -> NodeCount