Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix laziness while streaming blocks #2532

Merged
merged 1 commit into from
Aug 24, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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