mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
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:
committed by
Nik Bougalis
parent
d632f9f6c8
commit
e46d2bcf27
@@ -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());
|
||||
|
||||
|
||||
@@ -125,8 +125,6 @@ private:
|
||||
// Peer IDs expecting to receive a last link notification
|
||||
std::set<std::uint32_t> csIDs_;
|
||||
|
||||
std::optional<std::uint32_t> networkID_;
|
||||
|
||||
reduce_relay::Slots<UptimeClock> slots_;
|
||||
|
||||
// Transaction reduce-relay metrics
|
||||
@@ -391,7 +389,7 @@ public:
|
||||
std::optional<std::uint32_t>
|
||||
networkID() const override
|
||||
{
|
||||
return networkID_;
|
||||
return setup_.networkID;
|
||||
}
|
||||
|
||||
Json::Value
|
||||
|
||||
Reference in New Issue
Block a user