shed: Support miner nodes in rpc util
This commit is contained in:
parent
9b65793509
commit
ebfde330dd
@ -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