20 #include <ripple/app/ledger/LedgerMaster.h>
21 #include <ripple/app/main/Application.h>
22 #include <ripple/app/misc/AmendmentTable.h>
23 #include <ripple/net/RPCErr.h>
24 #include <ripple/protocol/ErrorCodes.h>
25 #include <ripple/protocol/Feature.h>
26 #include <ripple/protocol/jss.h>
27 #include <ripple/rpc/Context.h>
52 auto features = table.getJson(
isAdmin);
54 for (
auto const& [h, t] : majorities)
57 t.time_since_epoch().count();
61 jvReply[jss::features] = features;
65 auto feature = table.find(context.
params[jss::feature].
asString());
80 table.unVeto(feature);
87 auto m = majorities.
find(feature);
88 if (m != majorities.
end())
89 jvReply[jss::majority] = m->second.time_since_epoch().count();
bool isAdmin(Port const &port, Json::Value const ¶ms, beast::IP::Address const &remoteIp)
Json::Value doFeature(RPC::JsonContext &context)
majorityAmendments_t getMajorityAmendments(ReadView const &view)
Json::Value rpcError(int iError)
virtual AmendmentTable & getAmendmentTable()=0
LedgerMaster & ledgerMaster
@ rpcREPORTING_UNSUPPORTED
@ objectValue
object value (collection of name/value pairs).
virtual Config & config()=0
bool isMember(const char *key) const
Return true if the object has a member named key.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::shared_ptr< Ledger const > getValidatedLedger()
std::string to_string(Manifest const &m)
Format the specified manifest to a string for debugging purposes.
constexpr bool parseHex(std::string_view sv)
Parse a hex string into a base_uint.
std::string asString() const
Returns the unquoted string value.