mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-23 04:03:49 +00:00
Merge pull request #3490 from karalabe/fix-miner-api
eth: fix miner start API to accept int, not hexint
This commit is contained in:
commit
3e3edcc465
@ -138,13 +138,13 @@ func NewPrivateMinerAPI(e *Ethereum) *PrivateMinerAPI {
|
|||||||
|
|
||||||
// Start the miner with the given number of threads. If threads is nil the number of
|
// Start the miner with the given number of threads. If threads is nil the number of
|
||||||
// workers started is equal to the number of logical CPU's that are usable by this process.
|
// workers started is equal to the number of logical CPU's that are usable by this process.
|
||||||
func (s *PrivateMinerAPI) Start(threads *hexutil.Uint) (bool, error) {
|
func (s *PrivateMinerAPI) Start(threads *int) (bool, error) {
|
||||||
s.e.StartAutoDAG()
|
s.e.StartAutoDAG()
|
||||||
var err error
|
var err error
|
||||||
if threads == nil {
|
if threads == nil {
|
||||||
err = s.e.StartMining(runtime.NumCPU())
|
err = s.e.StartMining(runtime.NumCPU())
|
||||||
} else {
|
} else {
|
||||||
err = s.e.StartMining(int(*threads))
|
err = s.e.StartMining(*threads)
|
||||||
}
|
}
|
||||||
return err == nil, err
|
return err == nil, err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user