config: extract DealmakingConfig and Sealing config from Lotus for Boost (#8172)

* refactor sealingCfg and dealmakingCfg to be able to abstract Config

* fix error messages
This commit is contained in:
Anton Evangelatov
2022-03-03 15:37:23 +01:00
parent 066d0edf51
commit acbfc879aa
5 changed files with 185 additions and 76 deletions
+2 -2
View File
@@ -175,13 +175,13 @@ func GetAPIInfo(ctx *cli.Context, t repo.RepoType) (APIInfo, error) {
}
}
return APIInfo{}, fmt.Errorf("could not determine API endpoint for node type: %v", t)
return APIInfo{}, fmt.Errorf("could not determine API endpoint for node type: %v", t.Type())
}
func GetRawAPI(ctx *cli.Context, t repo.RepoType, version string) (string, http.Header, error) {
ainfo, err := GetAPIInfo(ctx, t)
if err != nil {
return "", nil, xerrors.Errorf("could not get API info for %s: %w", t, err)
return "", nil, xerrors.Errorf("could not get API info for %s: %w", t.Type(), err)
}
addr, err := ainfo.DialArgs(version)