Skip to content

Commit

Permalink
fix: correct worker number in log (#202)
Browse files Browse the repository at this point in the history
Co-authored-by: hunjixin <[email protected]>
  • Loading branch information
hunjixin and hunjixin authored Jun 27, 2024
1 parent 494584d commit a499e55
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions pkg/resourceprovider/minerctl.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ func (m *MinerController) miningWorkerController(ctx context.Context) {
numworkers = DefaultWorkerNum()
}

log.Info().Int("workernum", numworkers).Msg("Worker ready for mining")

resultCh := make(chan TaskResult, numworkers*2) //avoid lock worker if have much work to submit
launchWorkers := func(powCfg ResourceProviderPowOptions) error {
for i := 0; i < numworkers; i++ {
Expand Down
2 changes: 1 addition & 1 deletion pkg/resourceprovider/resourceprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ func (resourceProvider *ResourceProvider) StartMineLoop(ctx context.Context) err
Msgf("Mine and submit successfully")
}

log.Info().Msgf("Listen to new pow round signal, %d workers read to work", resourceProvider.options.Pow.NumWorkers)
log.Info().Msgf("Listen to new pow round signal")
miner := NewMinerController(nodeId, resourceProvider.options.Pow, taskCh, submitWork)
go miner.Start(ctx)
return nil
Expand Down

0 comments on commit a499e55

Please sign in to comment.