1#include <xrpld/app/ledger/LedgerMaster.h>
2#include <xrpld/app/main/Application.h>
3#include <xrpld/app/misc/SHAMapStore.h>
4#include <xrpld/rpc/Context.h>
6#include <xrpl/basics/base_uint.h>
7#include <xrpl/beast/core/LexicalCast.h>
8#include <xrpl/json/json_value.h>
9#include <xrpl/protocol/ErrorCodes.h>
10#include <xrpl/protocol/jss.h>
12#include <boost/algorithm/string/case_conv.hpp>
36 canDeleteSeq = canDelete.
asUInt();
41 boost::to_lower(canDeleteStr);
47 else if (canDeleteStr ==
"never")
51 else if (canDeleteStr ==
"always")
55 else if (canDeleteStr ==
"now")
58 if (canDeleteSeq == 0u)
61 else if (
uint256 lh; lh.parseHex(canDeleteStr))
68 canDeleteSeq = ledger->header().seq;
Value get(UInt index, Value const &defaultValue) const
If the array contains at least index+1 elements, returns the element value, otherwise returns default...
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.
std::shared_ptr< Ledger const > getLedgerByHash(uint256 const &hash)
virtual LedgerIndex getCanDelete()=0
Highest ledger that may be deleted.
virtual bool advisoryDelete() const =0
Whether advisory delete is enabled.
virtual LedgerIndex getLastRotated()=0
Maximum ledger that has been deleted, or will be deleted if currently in the act of online deletion.
virtual LedgerIndex setCanDelete(LedgerIndex canDelete)=0
Highest ledger that may be deleted.
virtual SHAMapStore & getSHAMapStore()=0
T find_first_not_of(T... args)
Out lexicalCast(In in, Out defaultValue=Out())
Convert from one type to another.
@ Object
object value (collection of name/value pairs).
json::Value makeError(ErrorCodeI code)
Returns a new json object that reflects the error code.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
json::Value doCanDelete(RPC::JsonContext &context)
LedgerMaster & ledgerMaster