diff --git a/changes/2024-06-19T182508-0400.txt b/changes/2024-06-19T182508-0400.txt new file mode 100644 index 0000000000..d9efe7e6e8 --- /dev/null +++ b/changes/2024-06-19T182508-0400.txt @@ -0,0 +1,2 @@ +Log current cut periodically, instead of when it changes, for more +consistency and less space use. diff --git a/node/ChainwebNode.hs b/node/ChainwebNode.hs index 9cfd59180c..057f33e485 100644 --- a/node/ChainwebNode.hs +++ b/node/ChainwebNode.hs @@ -215,9 +215,9 @@ runMonitorLoop actionLabel logger = runForeverThrottled runCutMonitor :: Logger logger => logger -> CutDb tbl -> IO () runCutMonitor logger db = L.withLoggerLabel ("component", "cut-monitor") logger $ \l -> runMonitorLoop "ChainwebNode.runCutMonitor" l $ do - S.mapM_ (logFunctionJson l Info) - $ S.map (cutToCutHashes Nothing) - $ cutStream db + logFunctionJson l Info . cutToCutHashes Nothing + =<< _cut db + threadDelay 15_000_000 data BlockUpdate = BlockUpdate { _blockUpdateBlockHeader :: !(ObjectEncoded BlockHeader)