Revert "Refactor send command for better testability"

This commit is contained in:
Jakub Sztandera
2021-02-23 15:25:19 +01:00
committed by GitHub
parent 7721ea20ba
commit bebc11522e
10 changed files with 97 additions and 3675 deletions
-13
View File
@@ -207,19 +207,6 @@ func GetFullNodeAPI(ctx *cli.Context) (api.FullNode, jsonrpc.ClientCloser, error
return client.NewFullNodeRPC(ctx.Context, addr, headers)
}
func GetFullNodeServices(ctx *cli.Context) (ServicesAPI, error) {
if tn, ok := ctx.App.Metadata["test-services"]; ok {
return tn.(ServicesAPI), nil
}
api, c, err := GetFullNodeAPI(ctx)
if err != nil {
return nil, err
}
return &ServicesImpl{api: api, closer: c}, nil
}
type GetStorageMinerOptions struct {
PreferHttp bool
}