Skip to content

Commit

Permalink
Fix laziness
Browse files Browse the repository at this point in the history
  • Loading branch information
kderme authored and mrBliss committed Aug 24, 2020
1 parent a778370 commit 6aba584
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,11 @@ prune db@LedgerDB{..} =
toPrune :: Int
toPrune = ledgerDbCountToPrune ledgerDbParams (Seq.length ledgerDbBlocks)

-- NOTE: we must inline 'prune' otherwise we get unexplained thunks in
-- 'LedgerDB' and thus a space leak. Alternatively, we could disable the
-- @-fstrictness@ optimisation (enabled by default for -O1). See #2532.
{-# INLINE prune #-}

-- | Push an updated ledger state
pushLedgerState :: l -- ^ Updated ledger state
-> r -- ^ Reference to the applied block
Expand Down

0 comments on commit 6aba584

Please sign in to comment.