20 #ifndef RIPPLE_APP_MISC_TRANSACTION_H_INCLUDED
21 #define RIPPLE_APP_MISC_TRANSACTION_H_INCLUDED
23 #include <ripple/basics/RangeSet.h>
24 #include <ripple/beast/utility/Journal.h>
25 #include <ripple/ledger/TxMeta.h>
26 #include <ripple/protocol/ErrorCodes.h>
27 #include <ripple/protocol/Protocol.h>
28 #include <ripple/protocol/STTx.h>
29 #include <ripple/protocol/TER.h>
30 #include <boost/optional.hpp>
31 #include <boost/variant.hpp>
74 boost::optional<std::uint64_t>
const& ledgerSeq,
75 boost::optional<std::string>
const& status,
279 boost::optional<CurrentLedgerState>
300 validatedLedger, fee, accountSeq, availableSeq);
static TransStatus sqlTransactionStatus(boost::optional< std::string > const &status)
std::uint32_t accountSeqAvail
static Transaction::pointer transactionFromSQL(boost::optional< std::uint64_t > const &ledgerSeq, boost::optional< std::string > const &status, Blob const &rawTxn, Application &app)
Tracks the number of instances of an object.
Json::Value getJson(JsonOptions options, bool binary=false) const
std::shared_ptr< STTx const > const & getSTransaction()
void setLedger(LedgerIndex ledger)
void setApplied()
setApplied Set this flag once was applied to open ledger
void setResult(TER terResult)
SubmitResult getSubmitResult() const
getSubmitResult Return submit result
uint256 const & getID() const
std::uint32_t accountSeqNext
void setStatus(TransStatus status)
std::shared_ptr< STTx const > mTransaction
Integers of any length that is a multiple of 32-bits.
boost::optional< CurrentLedgerState > getCurrentLedgerState() const
getCurrentLedgerState Get current ledger state of transaction
void clear()
clear Clear all states
void clearSubmitResult()
clearSubmitResult Clear all flags in SubmitResult
bool getApplying()
Detect if transaction is being batched.
void setCurrentLedgerState(LedgerIndex validatedLedger, XRPAmount fee, std::uint32_t accountSeq, std::uint32_t availableSeq)
setCurrentLedgerState Set current ledger state of transaction
Transaction(std::shared_ptr< STTx const > const &, std::string &, Application &) noexcept
CurrentLedgerState()=delete
LedgerIndex getLedger() const
CurrentLedgerState(LedgerIndex li, XRPAmount fee, std::uint32_t accSeqNext, std::uint32_t accSeqAvail)
void setKept()
setKept Set this flag once was put to localtxns queue
A generic endpoint for log messages.
bool any() const
any Get true of any state is true
SubmitResult submitResult_
different ways for transaction to be accepted
ClosedInterval< T > range(T low, T high)
Create a closed range interval.
TransStatus getStatus() const
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
boost::optional< CurrentLedgerState > currentLedgerState_
static std::variant< std::pair< std::shared_ptr< Transaction >, std::shared_ptr< TxMeta > >, TxSearched > load(uint256 const &id, Application &app, error_code_i &ec)
void setStatus(TransStatus status, std::uint32_t ledgerSeq)
boost::icl::closed_interval< T > ClosedInterval
A closed interval over the domain T.
void setApplying()
Set this flag once added to a batch.
void setQueued()
setQueued Set this flag once was put into heldtxns queue
LedgerIndex validatedLedger
void setBroadcast()
setBroadcast Set this flag once was broadcasted via network
void clearApplying()
Indicate that transaction application has been attempted.