20 #include <ripple/app/tx/impl/CancelCheck.h>
22 #include <ripple/app/ledger/Ledger.h>
23 #include <ripple/basics/Log.h>
24 #include <ripple/ledger/ApplyView.h>
25 #include <ripple/protocol/Feature.h>
26 #include <ripple/protocol/Indexes.h>
27 #include <ripple/protocol/STAccount.h>
28 #include <ripple/protocol/TER.h>
29 #include <ripple/protocol/TxFlags.h>
46 JLOG(ctx.
j.
warn()) <<
"Malformed transaction: Invalid flags set.";
59 JLOG(ctx.
j.
warn()) <<
"Check does not exist.";
80 JLOG(ctx.j.warn()) <<
"Check is not expired and canceler is "
81 "neither check source nor destination.";
89 CancelCheck::doApply()
91 auto const sleCheck = view().peek(keylet::check(ctx_.tx[
sfCheckID]));
95 JLOG(j_.
warn()) <<
"Check does not exist.";
101 auto viewJ = ctx_.app.journal(
"View");
108 if (!view().dirRemove(
109 keylet::ownerDir(dstId), page, sleCheck->
key(),
true))
111 JLOG(j_.
fatal()) <<
"Unable to delete check from destination.";
117 if (!view().dirRemove(
118 keylet::ownerDir(srcId), page, sleCheck->
key(),
true))
120 JLOG(j_.
fatal()) <<
"Unable to delete check from owner.";
126 auto const sleSrc = view().peek(keylet::account(srcId));
130 view().erase(sleCheck);
static TER preclaim(PreclaimContext const &ctx)
NotTEC preflight2(PreflightContext const &ctx)
Checks whether the signature appears valid.
bool enabled(uint256 const &feature) const
Returns true if a feature is enabled.
const SF_UINT64 sfOwnerNode
const SF_ACCOUNT sfDestination
const SF_UINT256 sfCheckID
NetClock::time_point parentCloseTime() const
Returns the close time of the previous ledger.
NotTEC preflight1(PreflightContext const &ctx)
Performs early sanity checks on the account and fee fields.
const SF_UINT32 sfExpiration
Integers of any length that is a multiple of 32-bits.
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< CanCvtToTER > TER
const SF_UINT64 sfDestinationNode
std::uint32_t getFlags() const
const uint256 featureChecks
virtual std::shared_ptr< SLE const > read(Keylet const &k) const =0
Return the state item associated with a key.
State information when determining if a tx is likely to claim a fee.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
const SF_ACCOUNT sfAccount
std::chrono::duration< rep, period > duration
State information when preflighting a tx.
Keylet check(AccountID const &id, std::uint32_t seq) noexcept
A Check.
constexpr std::uint32_t tfUniversalMask
std::chrono::time_point< NetClock > time_point
static NotTEC preflight(PreflightContext const &ctx)
TERSubset< CanCvtToNotTEC > NotTEC