Skip to content

Commit

Permalink
don't prune cuts at startup
Browse files Browse the repository at this point in the history
Change-Id: I82e10ee63220a2d1524c973992dc4e47e0a45f30
  • Loading branch information
chessai committed Jun 14, 2024
1 parent 1a9eb99 commit 66ff431
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions changes/2024-05-30T141646-0500.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Don't prune cuts on startup. This avoids a race condition where we prune cuts on startup, and we don't write a cut before shutting down.
2 changes: 0 additions & 2 deletions src/Chainweb/CutDB.hs
Original file line number Diff line number Diff line change
Expand Up @@ -439,8 +439,6 @@ startCutDb config logfun headerStore payloadStore cutHashesStore = mask_ $ do
queue <- newEmptyPQueue
cutAsync <- asyncWithUnmask $ \u -> u $ processor queue cutVar
logg Debug "CutDB started"
unless (_cutDbParamsReadOnly config) $
pruneCuts logfun (_chainwebVersion headerStore) config (cutAvgBlockHeight v initialCut) cutHashesStore
return CutDb
{ _cutDbCut = cutVar
, _cutDbQueue = queue
Expand Down

0 comments on commit 66ff431

Please sign in to comment.