lotus/cmd/lotus-sim/util.go

18 lines
437 B
Go
Raw Normal View History

2021-05-19 00:01:30 +00:00
package main
import (
"fmt"
"github.com/urfave/cli/v2"
"github.com/filecoin-project/lotus/cmd/lotus-sim/simulation"
"github.com/filecoin-project/lotus/lib/ulimit"
)
func open(cctx *cli.Context) (*simulation.Node, error) {
2024-06-21 18:48:22 +00:00
if _, _, err := ulimit.ManageFdLimit(); err != nil {
_, _ = fmt.Fprintf(cctx.App.ErrWriter, "ERROR: failed to raise ulimit: %s\n", err)
2021-05-19 00:01:30 +00:00
}
return simulation.OpenNode(cctx.Context, cctx.String("repo"))
}