mirror of
https://github.com/PeernetOfficial/Cmd.git
synced 2026-07-17 02:47:52 +01:00
Improvement of "debug connect" command output.
This commit is contained in:
@@ -44,14 +44,21 @@ func debugCmdConnect(nodeID []byte) {
|
||||
fmt.Printf("* Successfully discovered via DHT.\n")
|
||||
}
|
||||
|
||||
fmt.Printf("* Peer details:\n")
|
||||
fmt.Printf(" Uncontacted: %t\n", peer.IsVirtual())
|
||||
fmt.Printf(" Root peer: %t\n", peer.IsRootPeer)
|
||||
fmt.Printf(" User Agent: %s\n", peer.UserAgent)
|
||||
fmt.Printf(" Firewall: %t\n", peer.IsFirewallReported())
|
||||
|
||||
// virtual peer?
|
||||
if peer.IsVirtual() {
|
||||
fmt.Printf("* Peer is virtual and was not contacted before. It will show no active connections until contacted.\n")
|
||||
fmt.Printf("* Peer is virtual and was not contacted before. Sending out ping.\n")
|
||||
peer.Ping()
|
||||
} else {
|
||||
fmt.Printf("* Connections:\n")
|
||||
fmt.Printf("%s", textPeerConnections(peer))
|
||||
}
|
||||
|
||||
fmt.Printf("* Peer details:\n")
|
||||
fmt.Printf("%s", textPeerConnections(peer))
|
||||
|
||||
// ping via all connections TODO
|
||||
//fmt.Printf("* Sending ping:\n")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user