Add new 'consensus_info' RPC command to help troubleshoot consensus convergence issues.

This commit is contained in:
JoelKatz
2013-02-09 14:21:57 -08:00
parent b417ff4ef1
commit 18167be5e3
7 changed files with 123 additions and 3 deletions

View File

@@ -1343,6 +1343,15 @@ Json::Value RPCHandler::doSubmit(Json::Value jvRequest)
}
}
Json::Value RPCHandler::doConsensusInfo(Json::Value)
{
Json::Value ret(Json::objectValue);
ret["info"] = theApp->getOPs().getConsensusInfo();
return ret;
}
Json::Value RPCHandler::doServerInfo(Json::Value)
{
Json::Value ret(Json::objectValue);
@@ -2682,6 +2691,7 @@ Json::Value RPCHandler::doCommand(const Json::Value& jvRequest, int iRole)
{ "account_offers", &RPCHandler::doAccountOffers, false, optCurrent },
{ "account_tx", &RPCHandler::doAccountTransactions, false, optNetwork },
{ "connect", &RPCHandler::doConnect, true, optNone },
{ "consensus_info", &RPCHandler::doConsensusInfo, true, optNone },
{ "get_counts", &RPCHandler::doGetCounts, true, optNone },
{ "internal", &RPCHandler::doInternal, true, optNone },
{ "ledger", &RPCHandler::doLedger, false, optNetwork },