1#include <xrpld/app/ledger/LedgerMaster.h>
2#include <xrpld/app/main/Application.h>
3#include <xrpld/app/misc/AmendmentTable.h>
4#include <xrpld/rpc/Context.h>
6#include <xrpl/protocol/ErrorCodes.h>
7#include <xrpl/protocol/RPCErr.h>
8#include <xrpl/protocol/jss.h>
39 auto features = table.getJson(
isAdmin);
41 for (
auto const& [h, t] : majorities)
44 t.time_since_epoch().count();
48 jvReply[jss::features] = features;
52 auto feature = table.find(context.
params[jss::feature].
asString());
67 table.unVeto(feature);
74 auto m = majorities.
find(feature);
75 if (m != majorities.
end())
76 jvReply[jss::majority] = m->second.time_since_epoch().count();
std::string asString() const
Returns the unquoted string value.
bool isMember(char const *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