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"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"github.com/multiformats/go-multiaddr"
|
||||||
"html/template"
|
"html/template"
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
@ -105,6 +106,15 @@ var stateMinerInfo = &cli.Command{
|
|||||||
fmt.Printf("Worker:\t%s\n", mi.Worker)
|
fmt.Printf("Worker:\t%s\n", mi.Worker)
|
||||||
fmt.Printf("PeerID:\t%s\n", mi.PeerId)
|
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("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
|
return nil
|
||||||
},
|
},
|
||||||
|
@ -24,7 +24,7 @@ var actorCmd = &cli.Command{
|
|||||||
|
|
||||||
var actorSetAddrsCmd = &cli.Command{
|
var actorSetAddrsCmd = &cli.Command{
|
||||||
Name: "set-addrs",
|
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{
|
Flags: []cli.Flag{
|
||||||
&cli.Int64Flag{
|
&cli.Int64Flag{
|
||||||
Name: "gas-limit",
|
Name: "gas-limit",
|
||||||
|
Loading…
Reference in New Issue
Block a user