Merge pull request #2674 from filecoin-project/asr/multiaddrs

Include listen addresses in CLI miner info
This commit is contained in:
Łukasz Magiera 2020-07-30 03:52:36 +02:00 committed by GitHub
commit a68d6239dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View File

@ -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
},

View File

@ -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",