mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Add RPC command peers.
This commit is contained in:
@@ -349,6 +349,12 @@ Json::Value RPCServer::doConnect(Json::Value& params)
|
||||
return "connecting";
|
||||
}
|
||||
|
||||
Json::Value RPCServer::doPeers(Json::Value& params)
|
||||
{
|
||||
// peers
|
||||
return theApp->getConnectionPool().getPeersJson();
|
||||
}
|
||||
|
||||
Json::Value RPCServer::doSendTo(Json::Value& params)
|
||||
{ // Implement simple sending without gathering
|
||||
// sendto <destination> <amount>
|
||||
@@ -504,6 +510,7 @@ Json::Value RPCServer::doCommand(const std::string& command, Json::Value& params
|
||||
if(command=="unlock") return doUnlock(params);
|
||||
if(command=="sendto") return doSendTo(params);
|
||||
if(command=="connect") return doConnect(params);
|
||||
if(command=="peers") return doPeers(params);
|
||||
if(command=="tx") return doTx(params);
|
||||
if(command=="ledger") return doLedger(params);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user