diff options
Diffstat (limited to 'Kademlia.hs')
-rw-r--r-- | Kademlia.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Kademlia.hs b/Kademlia.hs index 63c2b494..4a811fa2 100644 --- a/Kademlia.hs +++ b/Kademlia.hs | |||
@@ -114,10 +114,10 @@ contramapIR f ir = InsertionReporter | |||
114 | -- | All the IO operations neccessary to maintain a Kademlia routing table. | 114 | -- | All the IO operations neccessary to maintain a Kademlia routing table. |
115 | data TableStateIO nid ni = TableStateIO | 115 | data TableStateIO nid ni = TableStateIO |
116 | { -- | Write the routing table. Typically 'writeTVar'. | 116 | { -- | Write the routing table. Typically 'writeTVar'. |
117 | tblWrite :: R.Table ni -> STM () | 117 | tblWrite :: R.BucketList ni -> STM () |
118 | 118 | ||
119 | -- | Read the routing table. Typically 'readTVar'. | 119 | -- | Read the routing table. Typically 'readTVar'. |
120 | , tblRead :: STM (R.Table ni) | 120 | , tblRead :: STM (R.BucketList ni) |
121 | 121 | ||
122 | -- | Issue a ping to a remote node and report 'True' if the node | 122 | -- | Issue a ping to a remote node and report 'True' if the node |
123 | -- responded within an acceptable time and 'False' otherwise. | 123 | -- responded within an acceptable time and 'False' otherwise. |
@@ -136,7 +136,7 @@ data TableStateIO nid ni = TableStateIO | |||
136 | , tblChanged :: RoutingTableChanged ni -> STM (IO ()) | 136 | , tblChanged :: RoutingTableChanged ni -> STM (IO ()) |
137 | } | 137 | } |
138 | 138 | ||
139 | vanillaIO :: TVar (Table ni) -> (ni -> IO Bool) -> TableStateIO nid ni | 139 | vanillaIO :: TVar (BucketList ni) -> (ni -> IO Bool) -> TableStateIO nid ni |
140 | vanillaIO var ping = TableStateIO | 140 | vanillaIO var ping = TableStateIO |
141 | { tblRead = readTVar var | 141 | { tblRead = readTVar var |
142 | , tblWrite = writeTVar var | 142 | , tblWrite = writeTVar var |
@@ -152,7 +152,7 @@ data Kademlia nid ni = Kademlia (InsertionReporter ni) | |||
152 | 152 | ||
153 | {- | 153 | {- |
154 | kademlia :: FiniteBits nid => | 154 | kademlia :: FiniteBits nid => |
155 | TVar (Table nid nid) -> (nid -> IO Bool) -> Kademlia nid nid | 155 | TVar (BucketList nid nid) -> (nid -> IO Bool) -> Kademlia nid nid |
156 | kademlia var ping = Kademlia quietInsertions | 156 | kademlia var ping = Kademlia quietInsertions |
157 | (KademliaSpace id testIdBit) | 157 | (KademliaSpace id testIdBit) |
158 | (vanillaIO var ping) | 158 | (vanillaIO var ping) |