mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Fix peer reporting.
This commit is contained in:
@@ -124,6 +124,7 @@ bool ConnectionPool::peerConnected(Peer::pointer peer, const NewcoinAddress& na)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
mConnectedMap[na] = peer;
|
||||||
bSuccess = true;
|
bSuccess = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user