mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Add RPC command unl_score to request scoring for debugging.
This commit is contained in:
@@ -694,6 +694,17 @@ Json::Value RPCServer::doUnlReset(Json::Value& params) {
|
|||||||
else return "invalid params";
|
else return "invalid params";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// unl_score
|
||||||
|
Json::Value RPCServer::doUnlScore(Json::Value& params) {
|
||||||
|
if(!params.size())
|
||||||
|
{
|
||||||
|
theApp->getUNL().nodeScore();
|
||||||
|
|
||||||
|
return "scoring requested";
|
||||||
|
}
|
||||||
|
else return "invalid params";
|
||||||
|
}
|
||||||
|
|
||||||
Json::Value RPCServer::doCommand(const std::string& command, Json::Value& params)
|
Json::Value RPCServer::doCommand(const std::string& command, Json::Value& params)
|
||||||
{
|
{
|
||||||
std::cerr << "RPC:" << command << std::endl;
|
std::cerr << "RPC:" << command << std::endl;
|
||||||
@@ -710,6 +721,7 @@ Json::Value RPCServer::doCommand(const std::string& command, Json::Value& params
|
|||||||
if(command=="unl_delete") return doUnlDelete(params);
|
if(command=="unl_delete") return doUnlDelete(params);
|
||||||
if(command=="unl_list") return doUnlList(params);
|
if(command=="unl_list") return doUnlList(params);
|
||||||
if(command=="unl_reset") return doUnlReset(params);
|
if(command=="unl_reset") return doUnlReset(params);
|
||||||
|
if(command=="unl_score") return doUnlScore(params);
|
||||||
|
|
||||||
if(command=="validation_create") return doValidatorCreate(params);
|
if(command=="validation_create") return doValidatorCreate(params);
|
||||||
|
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ class RPCServer : public boost::enable_shared_from_this<RPCServer>
|
|||||||
Json::Value doUnlFetch(Json::Value& params);
|
Json::Value doUnlFetch(Json::Value& params);
|
||||||
Json::Value doUnlList(Json::Value& params);
|
Json::Value doUnlList(Json::Value& params);
|
||||||
Json::Value doUnlReset(Json::Value& params);
|
Json::Value doUnlReset(Json::Value& params);
|
||||||
|
Json::Value doUnlScore(Json::Value& params);
|
||||||
|
|
||||||
Json::Value doValidatorCreate(Json::Value& params);
|
Json::Value doValidatorCreate(Json::Value& params);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user