20#include <xrpld/app/ledger/LedgerMaster.h>
21#include <xrpld/app/main/Application.h>
22#include <xrpld/app/misc/AmendmentTable.h>
23#include <xrpld/rpc/Context.h>
25#include <xrpl/protocol/ErrorCodes.h>
26#include <xrpl/protocol/RPCErr.h>
27#include <xrpl/protocol/jss.h>
58 auto features = table.getJson(
isAdmin);
60 for (
auto const& [h, t] : majorities)
63 t.time_since_epoch().count();
67 jvReply[jss::features] = features;
71 auto feature = table.find(context.
params[jss::feature].
asString());
86 table.unVeto(feature);
93 auto m = majorities.
find(feature);
94 if (m != majorities.
end())
95 jvReply[jss::majority] = m->second.time_since_epoch().count();
std::string asString() const
Returns the unquoted string value.
bool isMember(const char *key) const
Return true if the object has a member named key.
virtual AmendmentTable & getAmendmentTable()=0
std::shared_ptr< Ledger const > getValidatedLedger()
constexpr bool parseHex(std::string_view sv)
Parse a hex string into a base_uint.
@ objectValue
object value (collection of name/value pairs).
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
bool isAdmin(Port const &port, Json::Value const ¶ms, beast::IP::Address const &remoteIp)
Json::Value rpcError(int iError)
Json::Value doFeature(RPC::JsonContext &context)
majorityAmendments_t getMajorityAmendments(ReadView const &view)
std::string to_string(base_uint< Bits, Tag > const &a)
LedgerMaster & ledgerMaster