Add reachability info to miner info all

This commit is contained in:
Łukasz Magiera 2020-08-13 13:44:03 +02:00
parent 3f2a62b5e2
commit 069c39fc12
3 changed files with 8 additions and 3 deletions

View File

@ -24,7 +24,7 @@ var netCmd = &cli.Command{
NetId,
netFindPeer,
netScores,
netReachability,
NetReachability,
},
}
@ -204,7 +204,7 @@ var netFindPeer = &cli.Command{
},
}
var netReachability = &cli.Command{
var NetReachability = &cli.Command{
Name: "reachability",
Usage: "Print information about reachability from the internet",
Action: func(cctx *cli.Context) error {

View File

@ -63,6 +63,11 @@ var infoAllCmd = &cli.Command{
return err
}
fmt.Println("\n#: Reachability")
if err := lcli.NetReachability.Action(cctx); err != nil {
return err
}
// Very Verbose info
fmt.Println("\n#: Peers")
if err := lcli.NetPeers.Action(cctx); err != nil {

View File

@ -2,7 +2,6 @@ package common
import (
"context"
basichost "github.com/libp2p/go-libp2p/p2p/host/basic"
"sort"
"strings"
@ -13,6 +12,7 @@ import (
"github.com/libp2p/go-libp2p-core/network"
"github.com/libp2p/go-libp2p-core/peer"
swarm "github.com/libp2p/go-libp2p-swarm"
basichost "github.com/libp2p/go-libp2p/p2p/host/basic"
ma "github.com/multiformats/go-multiaddr"
"go.uber.org/fx"
"golang.org/x/xerrors"