This commit is contained in:
Dmitry Zuikov 2024-09-19 11:43:47 +03:00
parent c1c9927b9a
commit 6ace073d9c
2 changed files with 13 additions and 5 deletions

View File

@ -658,6 +658,8 @@ refchanImport = do
Left (txh, orig, href, gk) -> do
hx <- writeAsMerkle sto (serialise gk)
notice $ "import GK" <+> pretty hx <+> "from" <+> pretty href
-- let tx = AnnotatedHashRef _ href <- deserialiseOrFail @AnnotatedHashRef (LBS.fromStrict bs)
-- & toMPlus . either (const Nothing) Just
insertScanned txh
-- TODO: ASAP-notify-hbs2-keyman
-- у нас два варианта:

View File

@ -177,15 +177,21 @@ updateKeys = do
-- будет болтаться, если она не AnnotatedHashRef
lift $ lift $ S.yield (Left tx0)
gk <- deserialiseOrFail @(GroupKey 'Symm HBS2Basic) gkbs & toMPlus
let gkz1 = deserialiseOrFail @(GroupKey 'Symm HBS2Basic) gkbs
& either mempty List.singleton
gkId <- getGroupKeyId gk & toMPlus
let gkz2 = deserialiseOrFail @[GroupKey 'Symm HBS2Basic] gkbs
& fromRight mempty
--TODO: verify-group-key-id-if-possible
for_ (gkz1 <> gkz2) $ \gk -> do
notice $ green "found new gk0" <+> pretty gkId <+> pretty gkh
gkId <- getGroupKeyId gk & toMPlus
lift $ lift $ S.yield (Right (gkId, gkh, gk) )
--TODO: verify-group-key-id-if-possible
notice $ green "found new gk0" <+> pretty gkId <+> pretty gkh
lift $ lift $ S.yield (Right (gkId, gkh, gk) )
_ -> do
lift $ S.yield (Left tx0)