20 #include <ripple/app/ledger/LedgerMaster.h>
21 #include <ripple/app/main/Application.h>
22 #include <ripple/app/misc/NetworkOPs.h>
23 #include <ripple/app/misc/SHAMapStore.h>
24 #include <ripple/beast/core/LexicalCast.h>
25 #include <ripple/protocol/ErrorCodes.h>
26 #include <ripple/protocol/jss.h>
27 #include <ripple/rpc/Context.h>
28 #include <boost/algorithm/string/case_conv.hpp>
29 #include <boost/format.hpp>
52 canDeleteSeq = canDelete.
asUInt();
57 boost::to_lower(canDeleteStr);
62 canDeleteSeq = beast::lexicalCast<std::uint32_t>(canDeleteStr);
64 else if (canDeleteStr ==
"never")
68 else if (canDeleteStr ==
"always")
72 else if (canDeleteStr ==
"now")
85 canDeleteSeq = ledger->info().seq;
93 ret[jss::can_delete] =
Value get(UInt index, const Value &defaultValue) const
If the array contains at least index+1 elements, returns the element value, otherwise returns default...
LedgerMaster & ledgerMaster
std::shared_ptr< Ledger const > getLedgerByHash(uint256 const &hash)
T find_first_not_of(T... args)
@ rpcREPORTING_UNSUPPORTED
virtual LedgerIndex getLastRotated()=0
Maximum ledger that has been deleted, or will be deleted if currently in the act of online deletion.
virtual bool advisoryDelete() const =0
Whether advisory delete is enabled.
@ objectValue
object value (collection of name/value pairs).
virtual LedgerIndex setCanDelete(LedgerIndex canDelete)=0
Highest ledger that may be deleted.
virtual Config & config()=0
Json::Value doCanDelete(RPC::JsonContext &context)
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.
virtual LedgerIndex getCanDelete()=0
Highest ledger that may be deleted.
virtual SHAMapStore & getSHAMapStore()=0
constexpr bool parseHex(std::string_view sv)
Parse a hex string into a base_uint.
Json::Value make_error(error_code_i code)
Returns a new json object that reflects the error code.
std::string asString() const
Returns the unquoted string value.