2019-10-04 19:55:33 +00:00
|
|
|
package cli
|
|
|
|
|
|
|
|
import (
|
2019-10-18 04:47:41 +00:00
|
|
|
"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",
|
2019-11-08 06:06:08 +00:00
|
|
|
Flags: []cli.Flag{
|
|
|
|
&cli.BoolFlag{
|
|
|
|
Name: "only-verify-keys",
|
|
|
|
Usage: "only download the verify keys",
|
|
|
|
},
|
2019-11-14 01:15:33 +00:00
|
|
|
&cli.BoolFlag{
|
2019-11-14 16:43:33 +00:00
|
|
|
Name: "include-test-params",
|
2019-11-14 01:15:33 +00:00
|
|
|
Usage: "download params used for tests",
|
|
|
|
},
|
2019-11-08 06:06:08 +00:00
|
|
|
},
|
2019-10-04 19:55:33 +00:00
|
|
|
Action: func(cctx *cli.Context) error {
|
2019-11-14 16:43:33 +00:00
|
|
|
err := build.GetParams(!cctx.Bool("only-verify-keys"), cctx.Bool("include-test-params"))
|
2019-11-14 01:15:33 +00:00
|
|
|
if err != nil {
|
2019-10-04 19:55:33 +00:00
|
|
|
return xerrors.Errorf("fetching proof parameters: %w", err)
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
},
|
|
|
|
}
|