20 #ifndef RIPPLE_RPC_HANDLER_H_INCLUDED
21 #define RIPPLE_RPC_HANDLER_H_INCLUDED
23 #include <ripple/core/Config.h>
24 #include <ripple/rpc/RPCHandler.h>
25 #include <ripple/rpc/Status.h>
26 #include <ripple/rpc/impl/Tuning.h>
27 #include <ripple/app/ledger/LedgerMaster.h>
28 #include <ripple/app/misc/NetworkOPs.h>
48 template <
class JsonValue>
60 template <
class Value>
65 result[field] = value;
78 JLOG (context.j.info())
79 <<
"Insufficient network mode for RPC: "
80 << context.netOps.strOperatingMode ();
85 if (context.app.getOPs().isAmendmentBlocked() &&
92 if (!context.app.config().standalone() &&
95 if (context.ledgerMaster.getValidatedLedgerAge () >
101 auto const cID = context.ledgerMaster.getCurrentLedgerIndex ();
102 auto const vID = context.ledgerMaster.getValidLedgerIndex ();
106 JLOG (context.j.debug()) <<
"Current ledger ID(" << cID <<
107 ") is less than validated ledger ID(" << vID <<
")";
113 !context.ledgerMaster.getClosedLedger ())
@ NEEDS_NETWORK_CONNECTION
@ SYNCING
fallen slightly behind
JSON (JavaScript Object Notation).
@ objectValue
object value (collection of name/value pairs).
RPC::Condition condition_
Status represents the results of an operation that might fail.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Method< Json::Value > valueMethod_
error_code_i conditionMet(Condition condition_required, T &context)
Lightweight wrapper to tag static string.
Json::Value makeObjectValue(Value const &value, Json::StaticString const &field=jss::message)
Return a Json::objectValue with a single entry.
std::vector< char const * > getHandlerNames()
Return names of all methods.
Handler const * getHandler(unsigned version, std::string const &name)
Role
Indicates the level of administrative permission to grant.
constexpr auto maxValidatedLedgerAge