mirror of https://github.com/voidlizard/hbs2
fixed wtf / workaround?
This commit is contained in:
parent
7dde27345f
commit
9f745148e6
|
@ -73,12 +73,14 @@ findMissedBlocks href = do
|
||||||
|
|
||||||
walkMerkle (fromHashRef href) (lift . getBlock sto) $ \(hr :: Either (Hash HbSync) [HashRef]) -> do
|
walkMerkle (fromHashRef href) (lift . getBlock sto) $ \(hr :: Either (Hash HbSync) [HashRef]) -> do
|
||||||
case hr of
|
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
|
Right (hrr :: [HashRef]) -> do
|
||||||
forM_ hrr $ \hx -> runMaybeT do
|
forM_ hrr $ \hx -> runMaybeT do
|
||||||
blk <- lift $ getBlock sto (fromHashRef hx)
|
blk <- lift $ getBlock sto (fromHashRef hx)
|
||||||
|
|
||||||
unless (isJust blk) do
|
unless (isJust blk) do
|
||||||
|
-- err $ "TWO" <+> pretty hx
|
||||||
lift $ S.yield hx
|
lift $ S.yield hx
|
||||||
|
|
||||||
maybe1 blk none $ \bs -> do
|
maybe1 blk none $ \bs -> do
|
||||||
|
@ -199,7 +201,8 @@ importRefLogNew opts ref = runResourceT do
|
||||||
if null missed then do
|
if null missed then do
|
||||||
S.yield e
|
S.yield e
|
||||||
else do
|
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
|
pCommit <- liftIO $ startGitHashObject Commit
|
||||||
pTree <- liftIO $ startGitHashObject Tree
|
pTree <- liftIO $ startGitHashObject Tree
|
||||||
|
|
Loading…
Reference in New Issue