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/jss.h>
26 #include <ripple/rpc/Context.h>
50 auto features = table.getJson();
52 for (
auto const& [h, t] : majorities)
55 t.time_since_epoch().count();
59 jvReply[jss::features] = features;
63 auto feature = table.find(context.
params[jss::feature].
asString());
75 table.unVeto(feature);
80 auto m = majorities.
find(feature);
81 if (m != majorities.
end())
82 jvReply[jss::majority] = m->second.time_since_epoch().count();
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.