diff --git a/Command Line.go b/Command Line.go index 666d28b..da5e372 100644 --- a/Command Line.go +++ b/Command Line.go @@ -125,12 +125,12 @@ func userCommands() { } fmt.Printf("Private Key: %s\n", hex.EncodeToString(privateKey.Serialize())) - fmt.Printf("Public Key: %s\n", hex.EncodeToString(publicKey.SerializeCompressed())) + fmt.Printf("Public Key: %s\n", hex.EncodeToString(publicKey.SerializeCompressed())) case "debug key self": privateKey, publicKey := core.ExportPrivateKey() fmt.Printf("Private Key: %s\n", hex.EncodeToString(privateKey.Serialize())) - fmt.Printf("Public Key: %s\n", hex.EncodeToString(publicKey.SerializeCompressed())) + fmt.Printf("Public Key: %s\n", hex.EncodeToString(publicKey.SerializeCompressed())) case "peer list": for _, peer := range core.PeerlistGet() { @@ -147,19 +147,24 @@ func userCommands() { nodeID := core.SelfNodeID() fmt.Printf("----------------\nPublic Key: %s\nNode ID: %s\n\n", hex.EncodeToString(publicKey.SerializeCompressed()), hex.EncodeToString(nodeID)) - fmt.Printf("Listen Address Multicast IP out\n") + fmt.Printf("Listen Address Multicast IP out\n") for _, network := range core.GetNetworks(4) { address, _, broadcastIPv4 := network.GetListen() - fmt.Printf("%-30s\n", address.String()) + fmt.Printf("%-35s ", address.String()) - for _, broadcastIP := range broadcastIPv4 { - fmt.Printf(" %-30s\n", broadcastIP.String()) + for n, broadcastIP := range broadcastIPv4 { + if n > 0 { + fmt.Printf(", ") + } + fmt.Printf("%s", broadcastIP.String()) } + + fmt.Printf("\n") } for _, network := range core.GetNetworks(6) { address, multicastIP, _ := network.GetListen() - fmt.Printf("%-30s %-30s\n", address.String(), multicastIP.String()) + fmt.Printf("%-35s %s\n", address.String(), multicastIP.String()) } fmt.Printf("\nPeer ID Sent Received IP \n") diff --git a/go.mod b/go.mod index 1aa2cf2..365ea40 100644 --- a/go.mod +++ b/go.mod @@ -2,4 +2,4 @@ module github.com/PeernetOfficial/Cmd go 1.16 -require github.com/PeernetOfficial/core v0.0.0-20210415105906-ce2d3309af30 +require github.com/PeernetOfficial/core v0.0.0-20210418195030-00db57aed8e9 diff --git a/go.sum b/go.sum index 56e0fb4..cacd549 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -github.com/PeernetOfficial/core v0.0.0-20210415105906-ce2d3309af30 h1:wOV8hi1wEELinShrvu4PpzGHXyhoiz4GOiVB6NJys2I= -github.com/PeernetOfficial/core v0.0.0-20210415105906-ce2d3309af30/go.mod h1:D5dvzEaJ1Bg8slj35NExK6w6Q/2yEPbh4QyczY5tb14= +github.com/PeernetOfficial/core v0.0.0-20210418195030-00db57aed8e9 h1:fGdNCh5jtHDinuZcY9s96QxcrMtqFIlObKb06wRVM98= +github.com/PeernetOfficial/core v0.0.0-20210418195030-00db57aed8e9/go.mod h1:D5dvzEaJ1Bg8slj35NExK6w6Q/2yEPbh4QyczY5tb14= github.com/PeernetOfficial/core/dht v0.0.0-20210410140655-6a9d16717779 h1:P21VQkgh7qrNuXG/tiXC56BNv2cjGI6z/CYpfrCAVCk= github.com/PeernetOfficial/core/dht v0.0.0-20210410140655-6a9d16717779/go.mod h1:sb2H21VIVTohCXVrDFo/Skl2tN8Yzba+MXSS6NgCYXw= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII=