From efe4d2c20a0b8b039076ff71112874e73b48b7d0 Mon Sep 17 00:00:00 2001 From: Nate Maninger Date: Sun, 1 Sep 2024 17:56:14 -0700 Subject: [PATCH] cmd: add worker to log --- cmd/cpuminerd/main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/cpuminerd/main.go b/cmd/cpuminerd/main.go index d400bfb..be5a843 100644 --- a/cmd/cpuminerd/main.go +++ b/cmd/cpuminerd/main.go @@ -142,10 +142,10 @@ func main() { var wg sync.WaitGroup for i := 0; i < threads; i++ { wg.Add(1) - go func() { + go func(n int) { defer wg.Done() - runCPUMiner(ctx, c, address, log) - }() + runCPUMiner(ctx, c, address, log.With(zap.Int("worker", n))) + }(i + 1) } <-ctx.Done()