Merge pull request #2674 from filecoin-project/asr/multiaddrs
Include listen addresses in CLI miner info
This commit is contained in:
commit
a68d6239dc
10
cli/state.go
10
cli/state.go
@ -5,6 +5,7 @@ import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/multiformats/go-multiaddr"
|
||||
"html/template"
|
||||
"io"
|
||||
"os"
|
||||
@ -105,6 +106,15 @@ var stateMinerInfo = &cli.Command{
|
||||
fmt.Printf("Worker:\t%s\n", mi.Worker)
|
||||
fmt.Printf("PeerID:\t%s\n", mi.PeerId)
|
||||
fmt.Printf("SectorSize:\t%s (%d)\n", types.SizeStr(types.NewInt(uint64(mi.SectorSize))), mi.SectorSize)
|
||||
fmt.Printf("Multiaddrs: \t")
|
||||
for _, addr := range mi.Multiaddrs {
|
||||
a, err := multiaddr.NewMultiaddrBytes(addr)
|
||||
if err != nil {
|
||||
return xerrors.Errorf("undecodable listen address: %w", err)
|
||||
}
|
||||
fmt.Printf("%s ", a)
|
||||
}
|
||||
fmt.Println()
|
||||
|
||||
return nil
|
||||
},
|
||||
|
@ -24,7 +24,7 @@ var actorCmd = &cli.Command{
|
||||
|
||||
var actorSetAddrsCmd = &cli.Command{
|
||||
Name: "set-addrs",
|
||||
Usage: "set addresses that your miner can be publically dialed on",
|
||||
Usage: "set addresses that your miner can be publicly dialed on",
|
||||
Flags: []cli.Flag{
|
||||
&cli.Int64Flag{
|
||||
Name: "gas-limit",
|
||||
|
Loading…
Reference in New Issue
Block a user