Skip to content

Commit

Permalink
cmd: add worker to log
Browse files Browse the repository at this point in the history
  • Loading branch information
n8maninger committed Sep 2, 2024
1 parent 4e9c427 commit efe4d2c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/cpuminerd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit efe4d2c

Please sign in to comment.