mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-07 10:12:19 +00:00
8638e2c0b5
* blst build * Update stub.go Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
20 lines
328 B
Go
20 lines
328 B
Go
// +build linux,amd64 linux,arm64 darwin,amd64
|
|
// +build blst_enabled
|
|
|
|
package blst
|
|
|
|
import (
|
|
"runtime"
|
|
|
|
blst "github.com/supranational/blst/bindings/go"
|
|
)
|
|
|
|
func init() {
|
|
// Reserve 1 core for general application work
|
|
maxProcs := runtime.GOMAXPROCS(0) - 1
|
|
if maxProcs <= 0 {
|
|
maxProcs = 1
|
|
}
|
|
blst.SetMaxProcs(maxProcs)
|
|
}
|