mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
ethash: use numcpu instead of maxprocs
This commit is contained in:
parent
38c7eb0f26
commit
c56cf90db4
1 changed files with 1 additions and 1 deletions
|
|
@ -98,7 +98,7 @@ func (ethash *Ethash) VerifyHeaders(chain consensus.ChainReader, headers []*type
|
||||||
}
|
}
|
||||||
|
|
||||||
// Spawn as many workers as allowed threads
|
// Spawn as many workers as allowed threads
|
||||||
workers := runtime.GOMAXPROCS(0)
|
workers := runtime.NumCPU()
|
||||||
if len(headers) < workers {
|
if len(headers) < workers {
|
||||||
workers = len(headers)
|
workers = len(headers)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue