add network name to node

This commit is contained in:
Asim Aslam 2019-10-14 22:26:23 +01:00
parent df1e680256
commit b1fed01752

View File

@ -322,6 +322,11 @@ func peerProtoTopology(peer Node, depth uint) *pb.Peer {
Address: peer.Address(),
}
// set the network name if network is not nil
if peer.Network() != nil {
node.Network = peer.Network().Name()
}
pbPeers := &pb.Peer{
Node: node,
Peers: make([]*pb.Peer, 0),
@ -351,6 +356,12 @@ func PeersToProto(node Node, depth uint) *pb.Peer {
Id: node.Id(),
Address: node.Address(),
}
// set the network name if network is not nil
if node.Network() != nil {
pbNode.Network = node.Network().Name()
}
// we will build proto topology into this
pbPeers := &pb.Peer{
Node: pbNode,