provide an option to disable loading of built-in assets.

This commit is contained in:
Raúl Kripalani
2020-06-22 19:42:04 +01:00
parent 596ed330dd
commit d20255b1b4
3 changed files with 25 additions and 0 deletions
+6
View File
@@ -75,6 +75,12 @@ func GetParams(sbc *ffiwrapper.Config) error {
return err
}
// If built-in assets are disabled, we expect the user to have placed the right
// parameters in the right location on the filesystem (/var/tmp/filecoin-proof-parameters).
if build.DisableBuiltinAssets {
return nil
}
if err := paramfetch.GetParams(context.TODO(), build.ParametersJSON(), uint64(ssize)); err != nil {
return xerrors.Errorf("fetching proof parameters: %w", err)
}