diff --git a/fixme-new/lib/Fixme/Run/Internal.hs b/fixme-new/lib/Fixme/Run/Internal.hs index cbae6037..1b6c6668 100644 --- a/fixme-new/lib/Fixme/Run/Internal.hs +++ b/fixme-new/lib/Fixme/Run/Internal.hs @@ -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 -- у нас два варианта: diff --git a/hbs2-keyman/hbs2-keyman/Main.hs b/hbs2-keyman/hbs2-keyman/Main.hs index 37a4ecf6..ba3fdabe 100644 --- a/hbs2-keyman/hbs2-keyman/Main.hs +++ b/hbs2-keyman/hbs2-keyman/Main.hs @@ -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)