Fix Share stats disappearing regression

This commit is contained in:
satoshi committed 2026-09-02 00:42:32 +03:00
1 parent 4e40e08fd4
commit 89e9b32efd
6 files changed
+266 -2

No files matched your search

+7
View File
@@ -101,6 +101,13 @@ func main() {
zmq := zmqmon.New(cfg.BitcoinZMQBlock, log)
go zmq.Run(ctx)
// Restore persisted state before anything can mutate it. The log
// tailer's ingest goroutines below share these counters and persist
// them on their first event, so starting them against a half-loaded
// aggregator overwrites the accumulated history with a few seconds
// of new shares.
agg.LoadPersisted()
go agg.Run(ctx, zmq.Events)
// Background reconciliation: retry hash/reward enrichment for blocks