Fix peer reporting.

This commit is contained in:
Arthur Britto
2012-04-27 14:34:07 -07:00
parent c926a16c9c
commit 1509553cfc
2 changed files with 4 additions and 3 deletions

View File

@@ -124,6 +124,7 @@ bool ConnectionPool::peerConnected(Peer::pointer peer, const NewcoinAddress& na)
} }
else else
{ {
mConnectedMap[na] = peer;
bSuccess = true; bSuccess = true;
} }

View File

@@ -683,8 +683,8 @@ void Peer::punishPeer(PeerPunish)
Json::Value Peer::getJson() { Json::Value Peer::getJson() {
Json::Value ret(Json::objectValue); Json::Value ret(Json::objectValue);
ret["ip"] = mSocket.remote_endpoint().address().to_string(); ret["ip"] = mIpPort.first;
ret["port"] = mSocket.remote_endpoint().port(); ret["port"] = mIpPort.second;
ret["public_key"] = mPublicKey.ToString(); ret["public_key"] = mPublicKey.ToString();
return ret; return ret;