code: func New(cfg *Config) *CPUMiner {
  	return &CPUMiner{
  		g:                 cfg.BlockTemplateGenerator,
  		cfg:               *cfg,
  		numWorkers:        defaultNumWorkers,
  		updateNumWorkers:  make(chan struct{}),
  		queryHashesPerSec: make(chan float64),
  		updateHashes:      make(chan uint64),
  	}
  }
docs: // New returns a new instance of a CPU miner for the provided configuration.
  // Use Start to begin the mining process.  See the documentation for CPUMiner
  // type for more details.