mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-25 05:25:55 +00:00
Provide --testnet status to API.
This commit is contained in:
@@ -1079,6 +1079,9 @@ Json::Value NetworkOPs::getServerInfo()
|
||||
{
|
||||
Json::Value info = Json::objectValue;
|
||||
|
||||
if (theConfig.TESTNET)
|
||||
info["testnet"] = theConfig.TESTNET;
|
||||
|
||||
switch (mMode)
|
||||
{
|
||||
case omDISCONNECTED: info["serverState"] = "disconnected"; break;
|
||||
@@ -1462,7 +1465,11 @@ bool NetworkOPs::subServer(InfoSub* ispListener, Json::Value& jvResult)
|
||||
{
|
||||
uint256 uRandom;
|
||||
|
||||
jvResult["stand_alone"] = theConfig.RUN_STANDALONE;
|
||||
if (theConfig.RUN_STANDALONE)
|
||||
jvResult["stand_alone"] = theConfig.RUN_STANDALONE;
|
||||
|
||||
if (theConfig.TESTNET)
|
||||
jvResult["testnet"] = theConfig.TESTNET;
|
||||
|
||||
getRand(uRandom.begin(), uRandom.size());
|
||||
jvResult["random"] = uRandom.ToString();
|
||||
|
||||
Reference in New Issue
Block a user