sminer: info command
This commit is contained in:
parent
decbc3ef6c
commit
5861332f40
34
cmd/lotus-storage-miner/info.go
Normal file
34
cmd/lotus-storage-miner/info.go
Normal file
@ -0,0 +1,34 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"gopkg.in/urfave/cli.v2"
|
||||
|
||||
lcli "github.com/filecoin-project/go-lotus/cli"
|
||||
)
|
||||
|
||||
var infoCmd = &cli.Command{
|
||||
Name: "info",
|
||||
Usage: "Print storage miner info",
|
||||
Action: func(cctx *cli.Context) error {
|
||||
nodeApi, closer, err := lcli.GetStorageMinerAPI(cctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer closer()
|
||||
ctx := lcli.ReqContext(cctx)
|
||||
|
||||
aaddr, err := nodeApi.ActorAddresses(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
fmt.Printf("actor address: %s\n", aaddr)
|
||||
// TODO: grab actr state / info
|
||||
// * Sector size
|
||||
// * Sealed sectors (count / bytes)
|
||||
// * Power
|
||||
return nil
|
||||
},
|
||||
}
|
@ -21,6 +21,7 @@ func main() {
|
||||
local := []*cli.Command{
|
||||
runCmd,
|
||||
initCmd,
|
||||
infoCmd,
|
||||
storeGarbageCmd,
|
||||
sectorsCmd,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user