Merge pull request #5529 from filecoin-project/feat/shed-rpc-miner
shed: Support miner nodes in rpc util
This commit is contained in:
commit
5a3b983954
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user