Include p2p connection status in RPC net_info

This commit is contained in:
Jae Kwon
2016-01-03 06:21:56 -08:00
parent 1d34bb173e
commit f0c80837a6
2 changed files with 6 additions and 4 deletions

View File

@ -15,8 +15,9 @@ func NetInfo() (*ctypes.ResultNetInfo, error) {
peers := []ctypes.Peer{}
for _, peer := range p2pSwitch.Peers().List() {
peers = append(peers, ctypes.Peer{
NodeInfo: *peer.NodeInfo,
IsOutbound: peer.IsOutbound(),
NodeInfo: *peer.NodeInfo,
IsOutbound: peer.IsOutbound(),
ConnectionStatus: peer.Connection().Status(),
})
}
return &ctypes.ResultNetInfo{