summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Crayne <joe@jerkface.net>2019-12-03 10:58:10 -0500
committerJoe Crayne <joe@jerkface.net>2020-01-01 23:22:52 -0500
commit5ed2793f19883c2e90609a145346a4359ad4e1d2 (patch)
treeb1f7d6631991c6b095dff331eeac267ddc8e691a
parent457fec85e4b5e707d578df267ce5f5331b126a7f (diff)
Documentation for kademliaSample api.
-rw-r--r--kad/src/Network/Kademlia/Routing.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/kad/src/Network/Kademlia/Routing.hs b/kad/src/Network/Kademlia/Routing.hs
index c7fdf028..8412e789 100644
--- a/kad/src/Network/Kademlia/Routing.hs
+++ b/kad/src/Network/Kademlia/Routing.hs
@@ -798,7 +798,9 @@ data KademliaSpace nid ni = KademliaSpace
798 , kademliaTestBit :: nid -> Word -> Bool 798 , kademliaTestBit :: nid -> Word -> Bool
799 -- | The Kademlia xor-metric. 799 -- | The Kademlia xor-metric.
800 , kademliaXor :: nid -> nid -> nid 800 , kademliaXor :: nid -> nid -> nid
801 801 -- | Generate random node. Given a way to generate a random bytestring
802 -- of some length, the "self" node-id, and a tuple as output by
803 -- 'bucketRange', it supplies a new random node-id.
802 , kademliaSample :: forall m. Applicative m => (Int -> m BS.ByteString) -> nid -> (Int,Word8,Word8) -> m nid 804 , kademliaSample :: forall m. Applicative m => (Int -> m BS.ByteString) -> nid -> (Int,Word8,Word8) -> m nid
803 } 805 }
804 806