mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Warn operators about upcoming unknown amendments:
* When an unknown amendment reaches majority, log an error-level message, and return a `warnings` array on all successful admin-level RPC calls to `server_info` and `server_state` with a message describing the problem, and the expected deadline. * In addition to the `amendment_blocked` flag returned by `server_info` and `server_state`, return a warning with a more verbose description when the server is amendment blocked. * Check on every flag ledger to see if the amendment(s) lose majority. Logs again if they don't, resumes normal operations if they did. The intention is to give operators earlier warning that their instances are in danger of being amendment blocked, which will hopefully motivate them to update ahead of time.
This commit is contained in:
committed by
Manoj doshi
parent
4315913a5d
commit
5ff23f8f31
@@ -189,38 +189,6 @@ Status callMethod (
|
||||
}
|
||||
}
|
||||
|
||||
template <class Method, class Object>
|
||||
void getResult (
|
||||
JsonContext& context, Method method, Object& object, std::string const& name)
|
||||
{
|
||||
auto&& result = Json::addObject (object, jss::result);
|
||||
if (auto status = callMethod (context, method, name, result))
|
||||
{
|
||||
JLOG (context.j.debug()) << "rpcError: " << status.toString();
|
||||
result[jss::status] = jss::error;
|
||||
|
||||
auto rq = context.params;
|
||||
|
||||
if (rq.isObject())
|
||||
{
|
||||
if (rq.isMember(jss::passphrase.c_str()))
|
||||
rq[jss::passphrase.c_str()] = "<masked>";
|
||||
if (rq.isMember(jss::secret.c_str()))
|
||||
rq[jss::secret.c_str()] = "<masked>";
|
||||
if (rq.isMember(jss::seed.c_str()))
|
||||
rq[jss::seed.c_str()] = "<masked>";
|
||||
if (rq.isMember(jss::seed_hex.c_str()))
|
||||
rq[jss::seed_hex.c_str()] = "<masked>";
|
||||
}
|
||||
|
||||
result[jss::request] = rq;
|
||||
}
|
||||
else
|
||||
{
|
||||
result[jss::status] = jss::success;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
Status doCommand (
|
||||
|
||||
Reference in New Issue
Block a user