diff options
Diffstat (limited to 'src/Data/Kademlia/RoutingTable.hs')
-rw-r--r-- | src/Data/Kademlia/RoutingTable.hs | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/src/Data/Kademlia/RoutingTable.hs b/src/Data/Kademlia/RoutingTable.hs deleted file mode 100644 index 98e15a0b..00000000 --- a/src/Data/Kademlia/RoutingTable.hs +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | module Data.Kademlia.RoutingTable | ||
2 | ( | ||
3 | ) where | ||
4 | |||
5 | import Data.ByteString | ||
6 | |||
7 | type NodeID = ByteString | ||
8 | type InfoHash = ByteString | ||
9 | |||
10 | type Bucket = [NodeID] | ||
11 | |||
12 | data Tree | ||
13 | = Tip Bucket | ||
14 | | Bin Table Table | ||
15 | |||
16 | data Table = Table { | ||
17 | tree :: Tree | ||
18 | , bucketSize :: Int | ||
19 | } | ||
20 | |||
21 | closest :: InfoHash -> Table -> [NodeID] | ||
22 | closest = undefined | ||
23 | |||
24 | insert :: NodeID -> Table -> Table | ||
25 | insert x t = undefined | ||
26 | |||
27 | -- TODO table serialization: usually we need to save table between | ||
28 | -- target program executions | ||