Skip to content

Commit

Permalink
Merge #4039
Browse files Browse the repository at this point in the history
4039: db-analyser: use reapply not apply for --store-ledger r=dnadales a=nfrisby

This should have always been `reapply` instead of `apply`.

Co-authored-by: Nicolas Frisby <nick.frisby@iohk.io>
  • Loading branch information
iohk-bors[bot] and nfrisby committed Sep 27, 2022
2 parents 33fac3f + 410a84e commit dd86192
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -336,9 +336,8 @@ storeLedgerStateAt slotNo (AnalysisEnv { db, registry, initLedger, cfg, limit, l
where
process :: ExtLedgerState blk -> blk -> IO (NextStep, ExtLedgerState blk)
process oldLedger blk = do
let ledgerCfg = ExtLedgerCfg cfg
appliedResult = tickThenApplyLedgerResult ledgerCfg blk oldLedger
newLedger = either (error . show) lrResult $ runExcept $ appliedResult
let ledgerCfg = ExtLedgerCfg cfg
newLedger = tickThenReapply ledgerCfg blk oldLedger
when (blockSlot blk >= slotNo) $ storeLedgerState blk newLedger
when (blockSlot blk > slotNo) $ issueWarning blk
when ((unBlockNo $ blockNo blk) `mod` 1000 == 0) $ reportProgress blk
Expand Down

0 comments on commit dd86192

Please sign in to comment.