diff --git a/changes/2024-05-30T141646-0500.txt b/changes/2024-05-30T141646-0500.txt new file mode 100644 index 000000000..e8eb427fd --- /dev/null +++ b/changes/2024-05-30T141646-0500.txt @@ -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. diff --git a/src/Chainweb/CutDB.hs b/src/Chainweb/CutDB.hs index ea74dec47..c76f6c32b 100644 --- a/src/Chainweb/CutDB.hs +++ b/src/Chainweb/CutDB.hs @@ -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