From 167f580c2cbb08c541f1f4480f8862be75bd9ae0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Sat, 18 Jan 2020 19:17:14 +0100 Subject: Shared state with arbitrary types --- src/Attach.hs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/Attach.hs') diff --git a/src/Attach.hs b/src/Attach.hs index 298ed29..f3a98b3 100644 --- a/src/Attach.hs +++ b/src/Attach.hs @@ -224,11 +224,7 @@ finalizeAttach st identity skeys = do pkeys <- mapM (copyStored st) [ idKeyIdentity owner, idKeyMessage owner ] mapM_ storeKey $ catMaybes [ keyFromData sec pub | sec <- skeys, pub <- pkeys ] - mshared <- mergeSharedStates (lsShared $ fromStored slocal) - shared <- wrappedStore st $ (fromStored mshared) - { ssPrev = lsShared $ fromStored slocal - , ssIdentity = idDataF owner - } + shared <- makeSharedStateUpdate st (idDataF owner) (lsShared $ fromStored slocal) wrappedStore st (fromStored slocal) { lsIdentity = idData identity , lsShared = [ shared ] -- cgit v1.2.3