20#include <xrpld/app/tx/detail/PermissionedDomainDelete.h>
22#include <xrpl/ledger/View.h>
23#include <xrpl/protocol/TxFlags.h>
38 JLOG(ctx.
j.
debug()) <<
"PermissionedDomainDelete: invalid flags.";
43 if (domain == beast::zero)
53 auto const sleDomain = ctx.
view.
read({ltPERMISSIONED_DOMAIN, domain});
60 "ripple::PermissionedDomainDelete::preclaim : required fields present");
61 if (sleDomain->getAccountID(sfOwner) != ctx.
tx.
getAccountID(sfAccount))
73 "ripple::PermissionedDomainDelete::doApply : required field present");
77 auto const page = (*slePd)[sfOwnerNode];
82 <<
"Unable to delete permissioned domain directory entry.";
88 ownerSle && ownerSle->getFieldU32(sfOwnerCount) > 0,
89 "ripple::PermissionedDomainDelete::doApply : nonzero owner count");
beast::Journal const journal
virtual std::shared_ptr< SLE > peek(Keylet const &k)=0
Prepare to modify the SLE associated with key.
virtual void erase(std::shared_ptr< SLE > const &sle)=0
Remove a peeked SLE.
TER doApply() override
Attempt to delete the Permissioned Domain.
static TER preclaim(PreclaimContext const &ctx)
static NotTEC preflight(PreflightContext const &ctx)
virtual std::shared_ptr< SLE const > read(Keylet const &k) const =0
Return the state item associated with a key.
bool enabled(uint256 const &feature) const
Returns true if a feature is enabled.
AccountID getAccountID(SField const &field) const
T::value_type at(TypedField< T > const &f) const
Get the value of a field.
bool isFieldPresent(SField const &field) const
std::uint32_t getFlags() const
uint256 getFieldH256(SField const &field) const
Keylet account(AccountID const &id) noexcept
AccountID root.
Keylet ownerDir(AccountID const &id) noexcept
The root page of an account's directory.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
void adjustOwnerCount(ApplyView &view, std::shared_ptr< SLE > const &sle, std::int32_t amount, beast::Journal j)
Adjust the owner count up or down.
NotTEC preflight1(PreflightContext const &ctx)
Performs early sanity checks on the account and fee fields.
NotTEC preflight2(PreflightContext const &ctx)
Checks whether the signature appears valid.
bool isTesSuccess(TER x) noexcept
constexpr std::uint32_t tfUniversalMask
TERSubset< CanCvtToNotTEC > NotTEC
State information when determining if a tx is likely to claim a fee.
State information when preflighting a tx.