Correctly use the configured network_id parameter:

The existing code properly parses the network_id parameter from the
the configuration file, but it does not properly set up the code to
use the value correctly. As a result the configured `network_id` is
ignored.
This commit is contained in:
Chenna Keshava B S
2022-07-14 16:37:11 -07:00
committed by Nik Bougalis
parent d632f9f6c8
commit e46d2bcf27
2 changed files with 4 additions and 7 deletions

View File

@@ -2323,10 +2323,6 @@ NetworkOPsImp::getServerInfo(bool human, bool admin, bool counters)
if (!app_.config().SERVER_DOMAIN.empty())
info[jss::server_domain] = app_.config().SERVER_DOMAIN;
if (!app_.config().reporting())
if (auto const netid = app_.overlay().networkID())
info[jss::network_id] = static_cast<Json::UInt>(*netid);
info[jss::build_version] = BuildInfo::getVersionString();
info[jss::server_state] = strOperatingMode(admin);
@@ -2469,6 +2465,9 @@ NetworkOPsImp::getServerInfo(bool human, bool admin, bool counters)
if (!app_.config().reporting())
{
if (auto const netid = app_.overlay().networkID())
info[jss::network_id] = static_cast<Json::UInt>(*netid);
auto const escalationMetrics =
app_.getTxQ().getMetrics(*app_.openLedger().current());