Add RPC command peers.

This commit is contained in:
Arthur Britto
2012-03-10 19:06:05 -08:00
parent af929c7d49
commit 2596cce905
7 changed files with 35 additions and 0 deletions

View File

@@ -108,3 +108,16 @@ bool ConnectionPool::connectTo(const std::string& host, const std::string& port)
}
return true;
}
Json::Value ConnectionPool::getPeersJson()
{
Json::Value ret(Json::arrayValue);
BOOST_FOREACH(Peer::pointer peer, mPeers)
{
ret.append(peer->getJson());
}
return ret;
}