1#include <xrpl/ledger/ApplyView.h>
2#include <xrpl/ledger/View.h>
3#include <xrpl/ledger/helpers/AccountRootHelpers.h>
4#include <xrpl/protocol/Feature.h>
5#include <xrpl/protocol/Indexes.h>
6#include <xrpl/protocol/TER.h>
7#include <xrpl/protocol/TxFlags.h>
8#include <xrpl/tx/transactors/check/CheckCancel.h>
24 JLOG(ctx.
j.
warn()) <<
"Check does not exist.";
37 if (acctId != (*sleCheck)[sfAccount] && acctId != (*sleCheck)[sfDestination])
39 JLOG(ctx.
j.
warn()) <<
"Check is not expired and canceler is "
40 "neither check source nor destination.";
54 JLOG(
j_.
warn()) <<
"Check does not exist.";
58 AccountID const srcId{sleCheck->getAccountID(sfAccount)};
59 AccountID const dstId{sleCheck->getAccountID(sfDestination)};
70 JLOG(
j_.
fatal()) <<
"Unable to delete check from destination.";
80 JLOG(
j_.
fatal()) <<
"Unable to delete check from owner.";
std::reference_wrapper< ServiceRegistry > registry
virtual void erase(std::shared_ptr< SLE > const &sle)=0
Remove a peeked SLE.
virtual std::shared_ptr< SLE > peek(Keylet const &k)=0
Prepare to modify the SLE associated with key.
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.
Keylet ownerDir(AccountID const &id) noexcept
The root page of an account's directory.
Keylet check(AccountID const &id, std::uint32_t seq) noexcept
A Check.
Keylet account(AccountID const &id) noexcept
AccountID root.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
bool hasExpired(ReadView const &view, std::optional< std::uint32_t > const &exp)
Determines whether the given expiration time has passed.
void adjustOwnerCount(ApplyView &view, std::shared_ptr< SLE > const &sle, std::int32_t amount, beast::Journal j)
Adjust the owner count up or down.
TERSubset< CanCvtToNotTEC > NotTEC
State information when determining if a tx is likely to claim a fee.
State information when preflighting a tx.