Added NodeInfo (still need to add to AddrBook); Proper Handshake

This commit is contained in:
Jae Kwon
2015-04-20 15:29:01 -07:00
parent 4948fe7725
commit dc1fddd1d8
10 changed files with 121 additions and 44 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ func NetInfo() (*ctypes.ResponseNetInfo, error) {
peers := []ctypes.Peer{}
for _, peer := range p2pSwitch.Peers().List() {
peers = append(peers, ctypes.Peer{
Address: peer.Connection().RemoteAddress.String(),
NodeInfo: *peer.NodeInfo,
IsOutbound: peer.IsOutbound(),
})
}
+1 -1
View File
@@ -78,7 +78,7 @@ type ResponseNetInfo struct {
}
type Peer struct {
Address string
types.NodeInfo
IsOutbound bool
}