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();
86 if (context.apiVersion == 1)
91 if (context.app.getOPs().isAmendmentBlocked() &&
98 if (!context.app.config().standalone() &&
101 if (context.ledgerMaster.getValidatedLedgerAge() >
104 if (context.apiVersion == 1)
109 auto const cID = context.ledgerMaster.getCurrentLedgerIndex();
110 auto const vID = context.ledgerMaster.getValidLedgerIndex();
114 JLOG(context.j.debug())
115 <<
"Current ledger ID(" << cID
116 <<
") is less than validated ledger ID(" << vID <<
")";
117 if (context.apiVersion == 1)
124 !context.ledgerMaster.getClosedLedger())
126 if (context.apiVersion == 1)