mirror of
https://github.com/PeernetOfficial/Cmd.git
synced 2026-07-17 02:47:52 +01:00
Update to latest core.
This commit is contained in:
@@ -151,24 +151,35 @@ 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 External Port\n")
|
||||
|
||||
for _, network := range core.GetNetworks(4) {
|
||||
address, _, broadcastIPv4 := network.GetListen()
|
||||
fmt.Printf("%-35s ", address.String())
|
||||
address, _, broadcastIPv4, externalPort := network.GetListen()
|
||||
|
||||
broadcastIPsA := ""
|
||||
for n, broadcastIP := range broadcastIPv4 {
|
||||
if n > 0 {
|
||||
fmt.Printf(", ")
|
||||
broadcastIPsA += ", "
|
||||
}
|
||||
fmt.Printf("%s", broadcastIP.String())
|
||||
broadcastIPsA += broadcastIP.String()
|
||||
}
|
||||
|
||||
fmt.Printf("\n")
|
||||
externalPortA := ""
|
||||
if externalPort > 0 {
|
||||
externalPortA = strconv.Itoa(int(externalPort))
|
||||
}
|
||||
|
||||
fmt.Printf("%-46s %-31s %s\n", address.String(), broadcastIPsA, externalPortA)
|
||||
}
|
||||
for _, network := range core.GetNetworks(6) {
|
||||
address, multicastIP, _ := network.GetListen()
|
||||
fmt.Printf("%-35s %s\n", address.String(), multicastIP.String())
|
||||
address, multicastIP, _, externalPort := network.GetListen()
|
||||
|
||||
externalPortA := ""
|
||||
if externalPort > 0 {
|
||||
externalPortA = strconv.Itoa(int(externalPort))
|
||||
}
|
||||
|
||||
fmt.Printf("%-46s %-31s %s\n", address.String(), multicastIP.String(), externalPortA)
|
||||
}
|
||||
|
||||
fmt.Printf("\nPeer ID Sent Received IP Flags RTT \n")
|
||||
@@ -336,7 +347,7 @@ func textPeerConnections(peer *core.PeerInfo) (text string) {
|
||||
|
||||
list, _ := mapConnectionsA[adapterName]
|
||||
for _, c := range list {
|
||||
listenAddress, _, _ := c.Network.GetListen()
|
||||
listenAddress, _, _, _ := c.Network.GetListen()
|
||||
rttA := "N/A"
|
||||
if c.RoundTripTime > 0 {
|
||||
rttA = c.RoundTripTime.Round(time.Millisecond).String()
|
||||
@@ -346,7 +357,7 @@ func textPeerConnections(peer *core.PeerInfo) (text string) {
|
||||
|
||||
list, _ = mapConnectionsI[adapterName]
|
||||
for _, c := range list {
|
||||
listenAddress, _, _ := c.Network.GetListen()
|
||||
listenAddress, _, _, _ := c.Network.GetListen()
|
||||
rttA := "N/A"
|
||||
if c.RoundTripTime > 0 {
|
||||
rttA = c.RoundTripTime.Round(time.Millisecond).String()
|
||||
|
||||
2
go.mod
2
go.mod
@@ -2,4 +2,4 @@ module github.com/PeernetOfficial/Cmd
|
||||
|
||||
go 1.16
|
||||
|
||||
require github.com/PeernetOfficial/core v0.0.0-20210425201259-1e7bb0c40c87
|
||||
require github.com/PeernetOfficial/core v0.0.0-20210503120507-f3c9d5e17fcf
|
||||
|
||||
4
go.sum
4
go.sum
@@ -1,5 +1,5 @@
|
||||
github.com/PeernetOfficial/core v0.0.0-20210425201259-1e7bb0c40c87 h1:lDil7jWBpA83LRtIASvEgBMbmMDByeFOG+2Z2uZPjmQ=
|
||||
github.com/PeernetOfficial/core v0.0.0-20210425201259-1e7bb0c40c87/go.mod h1:aixWDMb5EZsrqSwKPVrOyfIp3yZTvvQPEvlj3lncjiA=
|
||||
github.com/PeernetOfficial/core v0.0.0-20210503120507-f3c9d5e17fcf h1:AxpUZWHwtdG1f57NeUISVNXl+9ERtDBHzlXU58z1KGg=
|
||||
github.com/PeernetOfficial/core v0.0.0-20210503120507-f3c9d5e17fcf/go.mod h1:aixWDMb5EZsrqSwKPVrOyfIp3yZTvvQPEvlj3lncjiA=
|
||||
github.com/PeernetOfficial/core/dht v0.0.0-20210425014452-611dfa3b1ce9 h1:kcjoWZl9GZ9uSajS6t0tiKDpaatUQ64tl3OqXPc+YsY=
|
||||
github.com/PeernetOfficial/core/dht v0.0.0-20210425014452-611dfa3b1ce9/go.mod h1:sb2H21VIVTohCXVrDFo/Skl2tN8Yzba+MXSS6NgCYXw=
|
||||
github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII=
|
||||
|
||||
Reference in New Issue
Block a user