eth: fix miner start API to accept int, not hexint

This commit is contained in:
Péter Szilágyi 2016-12-23 11:28:11 +02:00
parent 115364b0a9
commit 89a32267f7
No known key found for this signature in database
GPG Key ID: 119A76381CCB7DD2
1 changed files with 2 additions and 2 deletions

View File

@ -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
// 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()
var err error
if threads == nil {
err = s.e.StartMining(runtime.NumCPU())
} else {
err = s.e.StartMining(int(*threads))
err = s.e.StartMining(*threads)
}
return err == nil, err
}