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))
137 <<
": " << (page ?
"success" :
"failure");
149 sleAccountRoot->setFieldU32(
sfTicketCount, oldTicketCount + ticketCount);
156 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
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
std::string to_string(ListDisposition disposition)
uint256 getTicketIndex(AccountID const &account, std::uint32_t ticketSeq)
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.
bool enabled(uint256 const &id) const
Returns true if a feature is enabled.
virtual std::shared_ptr< SLE const > read(Keylet const &k) const =0
Return the state item associated with a key.
boost::optional< std::uint64_t > dirAdd(ApplyView &view, Keylet const &dir, uint256 const &uLedgerIndex, bool strictOrder, std::function< void(SLE::ref)> fDescriber, beast::Journal j)
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
const SF_ACCOUNT sfAccount
static NotTEC preflight(PreflightContext const &ctx)
Enforce constraints beyond those of the Transactor base class.
const std::uint32_t tfUniversalMask
State information when preflighting a tx.
Class describing the consequences to the account of applying a transaction if the transaction consume...
TER doApply() override
Precondition: fee collection is likely.