Don't show our validation key in non-admin server_info.

This commit is contained in:
JoelKatz
2013-01-15 17:03:00 -08:00
parent 940cc9059c
commit d398c5bb02
3 changed files with 10 additions and 5 deletions

View File

@@ -1093,7 +1093,7 @@ bool NetworkOPs::recvValidation(const SerializedValidation::pointer& val)
return theApp->getValidations().addValidation(val);
}
Json::Value NetworkOPs::getServerInfo()
Json::Value NetworkOPs::getServerInfo(bool admin)
{
Json::Value info = Json::objectValue;
@@ -1111,8 +1111,13 @@ Json::Value NetworkOPs::getServerInfo()
if (mNeedNetworkLedger)
info["network_ledger"] = "waiting";
if (theConfig.VALIDATION_PUB.isValid())
info["pubkey_validator"] = theConfig.VALIDATION_PUB.humanNodePublic();
if (admin)
{
if (theConfig.VALIDATION_PUB.isValid())
info["pubkey_validator"] = theConfig.VALIDATION_PUB.humanNodePublic();
else
info["pubkey_validator"] = "none";
}
info["pubkey_node"] = theApp->getWallet().getNodePublic().humanNodePublic();