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,7 +124,8 @@ bool ConnectionPool::peerConnected(Peer::pointer peer, const NewcoinAddress& na)
}
else
{
bSuccess = true;
mConnectedMap[na] = peer;
bSuccess = true;
}
return bSuccess;

View File

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