Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

Commit

Permalink
[DAE-108] Syncing into the future - fix
Browse files Browse the repository at this point in the history
  • Loading branch information
flyingleafe committed Mar 1, 2017
1 parent f9dfb6a commit 35286c9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Pos/Wallet/WalletMode.hs
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,10 @@ downloadHeader = getContextTMVar PC.ncProgressHeader
instance SscHelpersClass ssc =>
MonadBlockchainInfo (RawRealMode ssc) where
networkChainDifficulty = getContextTVar PC.ncLastKnownHeader >>= \case
Just lh -> return . Just $ lh ^. difficultyL
Just lh -> do
thDiff <- view difficultyL <$> topHeader @ssc
let lhDiff = lh ^. difficultyL
return . Just $ max thDiff lhDiff
Nothing -> runMaybeT $ do
cSlot <- flattenSlotId <$> MaybeT getCurrentSlot
th <- lift (topHeader @ssc)
Expand Down

0 comments on commit 35286c9

Please sign in to comment.