diff options
-rw-r--r-- | src/Network/BitTorrent/DHT/Routing.hs | 4 |
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. |
367 | shape :: Table ip -> [BucketSize] | 367 | shape :: Table ip -> [BucketSize] |
368 | shape (Tip _ _ bucket) = [PSQ.size bucket] | 368 | shape = map PSQ.size . toBucketList |
369 | shape (Zero t bucket) = PSQ.size bucket : shape t | ||
370 | shape (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. |
373 | size :: Table ip -> NodeCount | 371 | size :: Table ip -> NodeCount |