Skip to content

Commit

Permalink
TOSQUASH small mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
nfrisby committed Dec 2, 2023
1 parent 5461c6c commit 085645b
Showing 1 changed file with 13 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -307,21 +307,19 @@ initInternalState NodeKernelArgs { tracers, chainDB, registry, cfg
varLedgerJudgement <- do
wasCaughtUp <- GSM.hasMarkerFile gsmMarkerFileView
initJudgment <-
if not wasCaughtUp
then do
GSM.removeMarkerFile gsmMarkerFileView
return GSM.TooOld
else do
extLedgerState <- atomically $ ChainDB.getCurrentLedger chainDB
dur <-
computeDurationuntilTooOld
cfg
durationUntilTooOld
(ledgerState extLedgerState)
return $ case dur of
GSM.After{} -> GSM.YoungEnough
GSM.Already -> GSM.TooOld
GSM.UnsafeNever -> GSM.YoungEnough
if not wasCaughtUp then pure GSM.TooOld else do
extLedgerState <- atomically $ ChainDB.getCurrentLedger chainDB
dur <-
computeDurationuntilTooOld
cfg
durationUntilTooOld
(ledgerState extLedgerState)
case dur of
GSM.After{} -> return GSM.YoungEnough
GSM.UnsafeNever -> return GSM.YoungEnough
GSM.Already -> do
GSM.removeMarkerFile gsmMarkerFileView
return GSM.TooOld
LazySTM.newTVarIO initJudgment

varCandidates <- newTVarIO mempty
Expand Down

0 comments on commit 085645b

Please sign in to comment.