3#include <xrpl/basics/RangeSet.h>
4#include <xrpl/beast/utility/Journal.h>
5#include <xrpl/protocol/ErrorCodes.h>
6#include <xrpl/protocol/Protocol.h>
7#include <xrpl/protocol/STBase.h>
8#include <xrpl/protocol/STTx.h>
9#include <xrpl/protocol/TER.h>
10#include <xrpl/protocol/TxMeta.h>
11#include <xrpl/protocol/TxSearched.h>
53 boost::optional<std::uint64_t>
const& ledgerSeq,
54 boost::optional<std::string>
const& status,
321 return std::get<std::pair<uint256, uint32_t>>(
locator).first;
330 return std::get<std::pair<uint256, uint32_t>>(
locator).second;
339 return std::get<ClosedInterval<uint32_t>>(
locator);
A generic endpoint for log messages.
Rules controlling protocol behavior.
void setApplying()
Set this flag once added to a batch.
std::optional< CurrentLedgerState > getCurrentLedgerState() const
getCurrentLedgerState Get current ledger state of transaction
json::Value getJson(JsonOptions options, bool binary=false) const
static std::variant< std::pair< std::shared_ptr< Transaction >, std::shared_ptr< TxMeta > >, TxSearched > load(uint256 const &id, Application &app, ErrorCodeI &ec)
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
bool getApplying() const
Detect if transaction is being batched.
SubmitResult submitResult_
different ways for transaction to be accepted
std::shared_ptr< STTx const > transaction_
TransStatus getStatus() const
std::optional< uint32_t > txnSeq_
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 Locator locate(uint256 const &id, Application &app)
std::optional< uint32_t > networkID_
Transaction(std::shared_ptr< STTx const > const &, std::string &, Application &) noexcept
std::shared_ptr< Transaction > pointer
std::shared_ptr< STTx const > const & getSTransaction()
static TransStatus sqlTransactionStatus(boost::optional< std::string > const &status)
T holds_alternative(T... args)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::uint32_t LedgerIndex
A ledger index.
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.
TERSubset< CanCvtToTER > TER
std::vector< unsigned char > Blob
Storage for linear binary data.
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