mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-11-29 16:38:39 +00:00
Just some name changes, put in a stand in emission amount, and started copying the algo from Karlsen. Not release worthy yet. Therefore Dev branch exists now. Also, for now this is for research purposes only. I got no clue what to build on top of Kaspa yet. Help would be appreciated for ideas and implementations.
23 lines
468 B
Go
23 lines
468 B
Go
package execenv
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
"runtime"
|
|
|
|
"github.com/zoomy-network/zoomyd/infrastructure/os/limits"
|
|
)
|
|
|
|
// Initialize initializes the execution environment required to run kaspad
|
|
func Initialize(desiredLimits *limits.DesiredLimits) {
|
|
// Use all processor cores.
|
|
runtime.GOMAXPROCS(runtime.NumCPU())
|
|
|
|
// Up some limits.
|
|
if err := limits.SetLimits(desiredLimits); err != nil {
|
|
fmt.Fprintf(os.Stderr, "failed to set limits: %s\n", err)
|
|
os.Exit(1)
|
|
}
|
|
|
|
}
|