Browse Source

Net_info should print the ID of peers (#1312)

pull/1420/head
Zaki Manian 7 years ago
committed by Anton Kaliaev
parent
commit
f907113c19
2 changed files with 2 additions and 0 deletions
  1. +1
    -0
      rpc/core/net.go
  2. +1
    -0
      rpc/core/types/responses.go

+ 1
- 0
rpc/core/net.go View File

@ -43,6 +43,7 @@ func NetInfo() (*ctypes.ResultNetInfo, error) {
for _, peer := range p2pSwitch.Peers().List() {
peers = append(peers, ctypes.Peer{
NodeInfo: peer.NodeInfo(),
ID: peer.ID(),
IsOutbound: peer.IsOutbound(),
ConnectionStatus: peer.Status(),
})


+ 1
- 0
rpc/core/types/responses.go View File

@ -98,6 +98,7 @@ type ResultDialPeers struct {
type Peer struct {
p2p.NodeInfo `json:"node_info"`
p2p.ID `json:"node_id"`
IsOutbound bool `json:"is_outbound"`
ConnectionStatus p2p.ConnectionStatus `json:"connection_status"`
}


Loading…
Cancel
Save