1#ifndef XRPL_APP_MISC_TRANSACTION_H_INCLUDED
2#define XRPL_APP_MISC_TRANSACTION_H_INCLUDED
4#include <xrpl/basics/RangeSet.h>
5#include <xrpl/beast/utility/Journal.h>
6#include <xrpl/protocol/ErrorCodes.h>
7#include <xrpl/protocol/Protocol.h>
8#include <xrpl/protocol/STBase.h>
9#include <xrpl/protocol/STTx.h>
10#include <xrpl/protocol/TER.h>
11#include <xrpl/protocol/TxMeta.h>
59 boost::optional<std::uint64_t>
const& ledgerSeq,
60 boost::optional<std::string>
const& status,
297 validatedLedger, fee, accountSeq, availableSeq);
A generic endpoint for log messages.
Tracks the number of instances of an object.
std::shared_ptr< STTx const > mTransaction
void setApplying()
Set this flag once added to a batch.
std::optional< uint32_t > mTxnSeq
std::optional< CurrentLedgerState > getCurrentLedgerState() const
getCurrentLedgerState Get current ledger state of transaction
void setKept()
setKept Set this flag once was put to localtxns queue
LedgerIndex getLedger() const
void setQueued()
setQueued Set this flag once was put into held-txns queue
void clearSubmitResult()
clearSubmitResult Clear all flags in SubmitResult
void clearApplying()
Indicate that transaction application has been attempted.
void setApplied()
setApplied Set this flag once was applied to open ledger
void setStatus(TransStatus status, std::uint32_t ledgerSeq, std::optional< uint32_t > transactionSeq=std::nullopt, std::optional< uint32_t > networkID=std::nullopt)
SubmitResult getSubmitResult() const
getSubmitResult Return submit result
std::optional< uint32_t > mNetworkID
SubmitResult submitResult_
different ways for transaction to be accepted
TransStatus getStatus() const
void setCurrentLedgerState(LedgerIndex validatedLedger, XRPAmount fee, std::uint32_t accountSeq, std::uint32_t availableSeq)
setCurrentLedgerState Set current ledger state of transaction
void setResult(TER terResult)
static Transaction::pointer transactionFromSQL(boost::optional< std::uint64_t > const &ledgerSeq, boost::optional< std::string > const &status, Blob const &rawTxn, Application &app)
std::optional< CurrentLedgerState > currentLedgerState_
void setStatus(TransStatus status)
void setBroadcast()
setBroadcast Set this flag once was broadcasted via network
uint256 const & getID() const
void setLedger(LedgerIndex ledger)
static std::variant< std::pair< std::shared_ptr< Transaction >, std::shared_ptr< TxMeta > >, TxSearched > load(uint256 const &id, Application &app, error_code_i &ec)
Json::Value getJson(JsonOptions options, bool binary=false) const
static Locator locate(uint256 const &id, Application &app)
std::shared_ptr< STTx const > const & getSTransaction()
static TransStatus sqlTransactionStatus(boost::optional< std::string > const &status)
bool getApplying()
Detect if transaction is being batched.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
ClosedInterval< T > range(T low, T high)
Create a closed range interval.
boost::icl::closed_interval< T > ClosedInterval
A closed interval over the domain T.
Note, should be treated as flags that can be | and &.
LedgerIndex validatedLedger
CurrentLedgerState(LedgerIndex li, XRPAmount fee, std::uint32_t accSeqNext, std::uint32_t accSeqAvail)
std::uint32_t accountSeqNext
std::uint32_t accountSeqAvail
CurrentLedgerState()=delete
uint256 const & getNodestoreHash()
ClosedInterval< uint32_t > const & getLedgerRangeSearched()
uint32_t getLedgerSequence()
std::variant< std::pair< uint256, uint32_t >, ClosedInterval< uint32_t > > locator
bool any() const
any Get true of any state is true
void clear()
clear Clear all states