lotus/cli/params.go

27 lines
555 B
Go
Raw Normal View History

2019-10-04 19:55:33 +00:00
package cli
import (
"github.com/filecoin-project/lotus/build"
2019-10-04 19:55:33 +00:00
"golang.org/x/xerrors"
"gopkg.in/urfave/cli.v2"
)
var fetchParamCmd = &cli.Command{
Name: "fetch-params",
Usage: "Fetch proving parameters",
Flags: []cli.Flag{
2019-12-04 19:44:15 +00:00
&cli.Uint64Flag{
Name: "proving-params",
Usage: "download params used creating proofs for given size",
},
},
2019-10-04 19:55:33 +00:00
Action: func(cctx *cli.Context) error {
2019-12-04 19:44:15 +00:00
err := build.GetParams(cctx.Uint64("proving-params"))
if err != nil {
2019-10-04 19:55:33 +00:00
return xerrors.Errorf("fetching proof parameters: %w", err)
}
return nil
},
}