From 9f745148e6f45d01b269dde047d5999b4ab69f26 Mon Sep 17 00:00:00 2001 From: Dmitry Zuikov Date: Mon, 16 Oct 2023 07:45:17 +0300 Subject: [PATCH] fixed wtf / workaround? --- hbs2-git/lib/HBS2Git/Import.hs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hbs2-git/lib/HBS2Git/Import.hs b/hbs2-git/lib/HBS2Git/Import.hs index 8a201e20..587dc68f 100644 --- a/hbs2-git/lib/HBS2Git/Import.hs +++ b/hbs2-git/lib/HBS2Git/Import.hs @@ -73,12 +73,14 @@ findMissedBlocks href = do walkMerkle (fromHashRef href) (lift . getBlock sto) $ \(hr :: Either (Hash HbSync) [HashRef]) -> do case hr of - Left hx -> S.yield (HashRef hx) + -- FIXME: investigate-this-wtf + Left{} -> pure () -- err ("ONE" <+> pretty hx) >> S.yield (HashRef hx) Right (hrr :: [HashRef]) -> do forM_ hrr $ \hx -> runMaybeT do blk <- lift $ getBlock sto (fromHashRef hx) unless (isJust blk) do + -- err $ "TWO" <+> pretty hx lift $ S.yield hx maybe1 blk none $ \bs -> do @@ -199,7 +201,8 @@ importRefLogNew opts ref = runResourceT do if null missed then do S.yield e else do - debug $ "missed blocks in tree" <+> pretty e + -- forM_ missed $ \m -> do + err $ "missed blocks in tree" <+> pretty e -- <+> pretty m pCommit <- liftIO $ startGitHashObject Commit pTree <- liftIO $ startGitHashObject Tree