summaryrefslogtreecommitdiff
path: root/src/Attach.hs
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2020-01-18 19:17:14 +0100
committerRoman Smrž <roman.smrz@seznam.cz>2020-01-18 19:20:24 +0100
commit167f580c2cbb08c541f1f4480f8862be75bd9ae0 (patch)
tree0dcf276b14d7ae103d3d4e1e176a7e01f8b2dfab /src/Attach.hs
parentbc8507f96309aa3a3b8812e9d0badc3f924f54d5 (diff)
Shared state with arbitrary types
Diffstat (limited to 'src/Attach.hs')
-rw-r--r--src/Attach.hs6
1 files changed, 1 insertions, 5 deletions
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 ]