mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-15 14:21:22 +00:00
Net_info should print the ID of peers (#1312)
This commit is contained in:
committed by
Anton Kaliaev
parent
140f962201
commit
f907113c19
@ -43,6 +43,7 @@ func NetInfo() (*ctypes.ResultNetInfo, error) {
|
|||||||
for _, peer := range p2pSwitch.Peers().List() {
|
for _, peer := range p2pSwitch.Peers().List() {
|
||||||
peers = append(peers, ctypes.Peer{
|
peers = append(peers, ctypes.Peer{
|
||||||
NodeInfo: peer.NodeInfo(),
|
NodeInfo: peer.NodeInfo(),
|
||||||
|
ID: peer.ID(),
|
||||||
IsOutbound: peer.IsOutbound(),
|
IsOutbound: peer.IsOutbound(),
|
||||||
ConnectionStatus: peer.Status(),
|
ConnectionStatus: peer.Status(),
|
||||||
})
|
})
|
||||||
|
@ -98,6 +98,7 @@ type ResultDialPeers struct {
|
|||||||
|
|
||||||
type Peer struct {
|
type Peer struct {
|
||||||
p2p.NodeInfo `json:"node_info"`
|
p2p.NodeInfo `json:"node_info"`
|
||||||
|
p2p.ID `json:"node_id"`
|
||||||
IsOutbound bool `json:"is_outbound"`
|
IsOutbound bool `json:"is_outbound"`
|
||||||
ConnectionStatus p2p.ConnectionStatus `json:"connection_status"`
|
ConnectionStatus p2p.ConnectionStatus `json:"connection_status"`
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user