From 037981b15324ca3c1d4f560b928228be43f0729c Mon Sep 17 00:00:00 2001 From: joe Date: Tue, 29 May 2018 19:00:48 -0400 Subject: Obtain selected secret-key from STM state. --- examples/dhtd.hs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'examples/dhtd.hs') diff --git a/examples/dhtd.hs b/examples/dhtd.hs index 8fd707cd..6b8954d1 100644 --- a/examples/dhtd.hs +++ b/examples/dhtd.hs @@ -788,6 +788,9 @@ clientSession s@Session{..} sock cnum h = do goTarget $ dhtParseId nidstr goTarget nid = do + msec <- atomically $ do + ks <- map swap <$> readKeys userkeys (accounts roster) + return $ Data.List.lookup mypubkey ks hPutClient h "TODO: convert selected public key to private, call netCrypto.." goParse ("g", s) | Just DHT{..} <- Map.lookup netname dhts -- cgit v1.2.3