ethash: use numcpu instead of maxprocs

This commit is contained in:
Martin Holst Swende 2018-05-30 20:04:57 +02:00
parent 38c7eb0f26
commit c56cf90db4
No known key found for this signature in database
GPG key ID: 683B438C05A5DDF0

View file

@ -98,7 +98,7 @@ func (ethash *Ethash) VerifyHeaders(chain consensus.ChainReader, headers []*type
}
// Spawn as many workers as allowed threads
workers := runtime.GOMAXPROCS(0)
workers := runtime.NumCPU()
if len(headers) < workers {
workers = len(headers)
}