20 #include <ripple/app/ledger/Ledger.h>
21 #include <ripple/app/tx/impl/CreateTicket.h>
22 #include <ripple/basics/Log.h>
23 #include <ripple/protocol/Feature.h>
24 #include <ripple/protocol/Indexes.h>
25 #include <ripple/protocol/TxFlags.h>
26 #include <ripple/protocol/st.h>
97 sleAccountRoot->getFieldU32(
sfOwnerCount) + ticketCount);
114 txSeq != 0 && txSeq != (firstTicketSeq - 1))
121 SLE::pointer sleTicket = std::make_shared<SLE>(ticketKeylet);
133 <<
": " << (page ?
"success" :
"failure");
145 sleAccountRoot->setFieldU32(
sfTicketCount, oldTicketCount + ticketCount);
152 sleAccountRoot->setFieldU32(
sfSequence, firstTicketSeq + ticketCount);
Keylet ownerDir(AccountID const &id) noexcept
The root page of an account's directory.
const SF_UINT32 sfOwnerCount
NotTEC preflight2(PreflightContext const &ctx)
Checks whether the signature appears valid.
constexpr static std::uint32_t maxValidCount
A pair of SHAMap key and LedgerEntryType.
bool enabled(uint256 const &feature) const
Returns true if a feature is enabled.
const SF_UINT64 sfOwnerNode
Stream trace() const
Severity stream access functions.
virtual std::shared_ptr< SLE > peek(Keylet const &k)=0
Prepare to modify the SLE associated with key.
std::function< void(SLE::ref)> describeOwnerDir(AccountID const &account)
static TxConsequences makeTxConsequences(PreflightContext const &ctx)
const SF_UINT32 sfSequence
virtual Fees const & fees() const =0
Returns the fees for the base ledger.
SeqProxy getSeqProxy() const
const SF_UINT32 sfTicketSequence
static const ticket_t ticket
NotTEC preflight1(PreflightContext const &ctx)
Performs early sanity checks on the account and fee fields.
constexpr bool isTicket() const
void adjustOwnerCount(ApplyView &view, std::shared_ptr< SLE > const &sle, std::int32_t amount, beast::Journal j)
Adjust the owner count up or down.
Keylet account(AccountID const &id) noexcept
AccountID root.
const SF_UINT32 sfTicketCount
static TER preclaim(PreclaimContext const &ctx)
Enforce constraints beyond those of the Transactor base class.
std::uint32_t getFlags() const
constexpr static std::uint32_t maxTicketThreshold
A generic endpoint for log messages.
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.
virtual void insert(std::shared_ptr< SLE > const &sle)=0
Insert a new state SLE.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
virtual beast::Journal journal(std::string const &name)=0
XRPAmount accountReserve(std::size_t ownerCount) const
Returns the account reserve given the owner count, in drops.
@ tecINSUFFICIENT_RESERVE
const uint256 featureTicketBatch
std::string to_string(Manifest const &m)
Format the specified manifest to a string for debugging purposes.
const SF_ACCOUNT sfAccount
static NotTEC preflight(PreflightContext const &ctx)
Enforce constraints beyond those of the Transactor base class.
State information when preflighting a tx.
std::optional< std::uint64_t > dirInsert(Keylet const &directory, uint256 const &key, std::function< void(std::shared_ptr< SLE > const &)> const &describe)
Insert an entry to a directory.
constexpr std::uint32_t tfUniversalMask
Class describing the consequences to the account of applying a transaction if the transaction consume...
TER doApply() override
Precondition: fee collection is likely.