Merge pull request #5529 from filecoin-project/feat/shed-rpc-miner

shed: Support miner nodes in rpc util
This commit is contained in:
Łukasz Magiera 2021-02-09 17:23:08 +01:00 committed by GitHub
commit 5a3b983954
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,9 +24,18 @@ import (
var rpcCmd = &cli.Command{
Name: "rpc",
Usage: "Interactive JsonPRC shell",
// TODO: flag for miner/worker
Flags: []cli.Flag{
&cli.BoolFlag{
Name: "miner",
},
},
Action: func(cctx *cli.Context) error {
addr, headers, err := lcli.GetRawAPI(cctx, repo.FullNode)
rt := repo.FullNode
if cctx.Bool("miner") {
rt = repo.StorageMiner
}
addr, headers, err := lcli.GetRawAPI(cctx, rt)
if err != nil {
return err
}