Lazzeruz 3bfd50a3d9 Dev init
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.
2023-12-09 20:46:33 +01:00

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)
}
}