From 27e2a6f7615b3e6302dd8d06c88cc90825d35737 Mon Sep 17 00:00:00 2001 From: Dmitry Zuikov Date: Wed, 18 Oct 2023 16:02:32 +0300 Subject: [PATCH] fixed (?) wtf --- hbs2-core/lib/HBS2/Storage/Operations/Missed.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hbs2-core/lib/HBS2/Storage/Operations/Missed.hs b/hbs2-core/lib/HBS2/Storage/Operations/Missed.hs index 9600a751..b33fd5d2 100644 --- a/hbs2-core/lib/HBS2/Storage/Operations/Missed.hs +++ b/hbs2-core/lib/HBS2/Storage/Operations/Missed.hs @@ -24,8 +24,11 @@ findMissedBlocks sto href = do walkMerkle (fromHashRef href) (lift . getBlock sto) $ \(hr :: Either (Hash HbSync) [HashRef]) -> do case hr of + -- FIXME: investigate-this-wtf - Left hx -> S.yield (HashRef hx) + Left hx | fromHashRef href /= hx -> S.yield (HashRef hx) + | otherwise -> pure () + Right (hrr :: [HashRef]) -> do forM_ hrr $ \hx -> runMaybeT do blk <- lift $ getBlock sto (fromHashRef hx)