From ebfde330ddb51d22dc10ba6f2f468e9671193b1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Thu, 4 Feb 2021 20:06:00 +0100 Subject: [PATCH] shed: Support miner nodes in rpc util --- cmd/lotus-shed/rpc.go | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/cmd/lotus-shed/rpc.go b/cmd/lotus-shed/rpc.go index cbee95c6b..fe81e5a62 100644 --- a/cmd/lotus-shed/rpc.go +++ b/cmd/lotus-shed/rpc.go @@ -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 }