mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-25 13:35:54 +00:00
Don't show our validation key in non-admin server_info.
This commit is contained in:
@@ -1093,7 +1093,7 @@ bool NetworkOPs::recvValidation(const SerializedValidation::pointer& val)
|
|||||||
return theApp->getValidations().addValidation(val);
|
return theApp->getValidations().addValidation(val);
|
||||||
}
|
}
|
||||||
|
|
||||||
Json::Value NetworkOPs::getServerInfo()
|
Json::Value NetworkOPs::getServerInfo(bool admin)
|
||||||
{
|
{
|
||||||
Json::Value info = Json::objectValue;
|
Json::Value info = Json::objectValue;
|
||||||
|
|
||||||
@@ -1111,8 +1111,13 @@ Json::Value NetworkOPs::getServerInfo()
|
|||||||
if (mNeedNetworkLedger)
|
if (mNeedNetworkLedger)
|
||||||
info["network_ledger"] = "waiting";
|
info["network_ledger"] = "waiting";
|
||||||
|
|
||||||
if (theConfig.VALIDATION_PUB.isValid())
|
if (admin)
|
||||||
info["pubkey_validator"] = theConfig.VALIDATION_PUB.humanNodePublic();
|
{
|
||||||
|
if (theConfig.VALIDATION_PUB.isValid())
|
||||||
|
info["pubkey_validator"] = theConfig.VALIDATION_PUB.humanNodePublic();
|
||||||
|
else
|
||||||
|
info["pubkey_validator"] = "none";
|
||||||
|
}
|
||||||
info["pubkey_node"] = theApp->getWallet().getNodePublic().humanNodePublic();
|
info["pubkey_node"] = theApp->getWallet().getNodePublic().humanNodePublic();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -243,7 +243,7 @@ public:
|
|||||||
int getPreviousConvergeTime() { return mLastCloseConvergeTime; }
|
int getPreviousConvergeTime() { return mLastCloseConvergeTime; }
|
||||||
uint32 getLastCloseTime() { return mLastCloseTime; }
|
uint32 getLastCloseTime() { return mLastCloseTime; }
|
||||||
void setLastCloseTime(uint32 t) { mLastCloseTime = t; }
|
void setLastCloseTime(uint32 t) { mLastCloseTime = t; }
|
||||||
Json::Value getServerInfo();
|
Json::Value getServerInfo(bool admin);
|
||||||
uint32 acceptLedger();
|
uint32 acceptLedger();
|
||||||
boost::unordered_map<uint160,
|
boost::unordered_map<uint160,
|
||||||
std::list<LedgerProposal::pointer> >& peekStoredProposals() { return mStoredProposals; }
|
std::list<LedgerProposal::pointer> >& peekStoredProposals() { return mStoredProposals; }
|
||||||
|
|||||||
@@ -1305,7 +1305,7 @@ Json::Value RPCHandler::doServerInfo(Json::Value)
|
|||||||
{
|
{
|
||||||
Json::Value ret(Json::objectValue);
|
Json::Value ret(Json::objectValue);
|
||||||
|
|
||||||
ret["info"] = theApp->getOPs().getServerInfo();
|
ret["info"] = theApp->getOPs().getServerInfo(mRole == ADMIN);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user