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.
void setCurrentLedgerState(LedgerIndex validatedLedger, XRPAmount fee, std::uint32_t accountSeq, std::uint32_t availableSeq)
setCurrentLedgerState Set current ledger state of transaction
std::optional< CurrentLedgerState > currentLedgerState_
static Locator locate(uint256 const &id, Application &app)
static Transaction::pointer transactionFromSQL(boost::optional< std::uint64_t > const &ledgerSeq, boost::optional< std::string > const &status, Blob const &rawTxn, Application &app)
void setBroadcast()
setBroadcast Set this flag once was broadcasted via network
void setStatus(TransStatus status)
void clearSubmitResult()
clearSubmitResult Clear all flags in SubmitResult
bool getApplying()
Detect if transaction is being batched.
std::optional< uint32_t > mNetworkID
std::optional< uint32_t > mTxnSeq
void setQueued()
setQueued Set this flag once was put into heldtxns queue
void setApplied()
setApplied Set this flag once was applied to open 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)
TransStatus getStatus() const
LedgerIndex getLedger() const
void setApplying()
Set this flag once added to a batch.
void setKept()
setKept Set this flag once was put to localtxns queue
std::shared_ptr< STTx const > const & getSTransaction()
void setLedger(LedgerIndex ledger)
SubmitResult submitResult_
different ways for transaction to be accepted
void setStatus(TransStatus status, std::uint32_t ledgerSeq, std::optional< uint32_t > transactionSeq=std::nullopt, std::optional< uint32_t > networkID=std::nullopt)
static TransStatus sqlTransactionStatus(boost::optional< std::string > const &status)
void clearApplying()
Indicate that transaction application has been attempted.
Json::Value getJson(JsonOptions options, bool binary=false) const
uint256 const & getID() const
std::shared_ptr< STTx const > mTransaction
void setResult(TER terResult)
std::optional< CurrentLedgerState > getCurrentLedgerState() const
getCurrentLedgerState Get current ledger state of transaction
SubmitResult getSubmitResult() const
getSubmitResult Return submit result
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
boost::icl::closed_interval< T > ClosedInterval
A closed interval over the domain T.
ClosedInterval< T > range(T low, T high)
Create a closed range interval.
Note, should be treated as flags that can be | and &.
CurrentLedgerState()=delete
std::uint32_t accountSeqNext
std::uint32_t accountSeqAvail
LedgerIndex validatedLedger
CurrentLedgerState(LedgerIndex li, XRPAmount fee, std::uint32_t accSeqNext, std::uint32_t accSeqAvail)
uint256 const & getNodestoreHash()
std::variant< std::pair< uint256, uint32_t >, ClosedInterval< uint32_t > > locator
ClosedInterval< uint32_t > const & getLedgerRangeSearched()
uint32_t getLedgerSequence()
bool any() const
any Get true of any state is true
void clear()
clear Clear all states