mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-27 06:25:51 +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;
|
Json::Value info = Json::objectValue;
|
||||||
|
|
||||||
|
if (theConfig.TESTNET)
|
||||||
|
info["testnet"] = theConfig.TESTNET;
|
||||||
|
|
||||||
switch (mMode)
|
switch (mMode)
|
||||||
{
|
{
|
||||||
case omDISCONNECTED: info["serverState"] = "disconnected"; break;
|
case omDISCONNECTED: info["serverState"] = "disconnected"; break;
|
||||||
@@ -1462,7 +1465,11 @@ bool NetworkOPs::subServer(InfoSub* ispListener, Json::Value& jvResult)
|
|||||||
{
|
{
|
||||||
uint256 uRandom;
|
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());
|
getRand(uRandom.begin(), uRandom.size());
|
||||||
jvResult["random"] = uRandom.ToString();
|
jvResult["random"] = uRandom.ToString();
|
||||||
|
|||||||
Reference in New Issue
Block a user