From aa5c91dd83558f333bbf7a791b727a45fa4355c6 Mon Sep 17 00:00:00 2001 From: Kleissner Date: Sat, 20 Nov 2021 05:28:34 +0100 Subject: [PATCH] Improvement of "debug connect" command output. --- Command Debug.go | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/Command Debug.go b/Command Debug.go index 8241570..90732f1 100644 --- a/Command Debug.go +++ b/Command Debug.go @@ -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") }