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

@@ -1106,6 +1106,16 @@ bool NetworkOPs::recvValidation(const SerializedValidation::pointer& val)
return theApp->getValidations().addValidation(val);
}
Json::Value NetworkOPs::getConsensusInfo()
{
if (mConsensus)
return mConsensus->getJson(true);
Json::Value info = Json::objectValue;
info["consensus"] = "none";
return info;
}
Json::Value NetworkOPs::getServerInfo(bool human, bool admin)
{
Json::Value info = Json::objectValue;