20 #ifndef RIPPLE_RPC_HANDLER_H_INCLUDED
21 #define RIPPLE_RPC_HANDLER_H_INCLUDED
23 #include <ripple/app/ledger/LedgerMaster.h>
24 #include <ripple/app/misc/NetworkOPs.h>
25 #include <ripple/core/Config.h>
26 #include <ripple/rpc/RPCHandler.h>
27 #include <ripple/rpc/Status.h>
28 #include <ripple/rpc/impl/Tuning.h>
48 template <
class JsonValue>
61 template <
class Value>
68 result[field] = value;
83 JLOG(context.j.info()) <<
"Insufficient network mode for RPC: "
84 << context.netOps.strOperatingMode();
89 if (context.app.getOPs().isAmendmentBlocked() &&
96 if (!context.app.config().standalone() &&
99 if (context.ledgerMaster.getValidatedLedgerAge() >
105 auto const cID = context.ledgerMaster.getCurrentLedgerIndex();
106 auto const vID = context.ledgerMaster.getValidLedgerIndex();
110 JLOG(context.j.debug())
111 <<
"Current ledger ID(" << cID
112 <<
") is less than validated ledger ID(" << vID <<
")";
118 !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