5#ifndef BITCOIN_WALLET_TRANSACTION_H
6#define BITCOIN_WALLET_TRANSACTION_H
24 if (!mapValue.count(
"n")) {
30 nOrderPos =
atoi64(mapValue[
"n"]);
35 if (nOrderPos == -1) {
Legacy class used for deserializing vtxPrev for backwards compatibility.
void Unserialize(Stream &s)
A transaction with a bunch of additional info that only the owner cares about.
Status
New transactions start as UNCONFIRMED.
mapValue_t mapValue
Key/value map with information about the transaction.
bool isUnconfirmed() const
CWalletTx(CWalletTx const &)=delete
void operator=(CWalletTx const &x)=delete
static constexpr const uint256 & ABANDON_HASH
Constant used in hashBlock to indicate tx has been abandoned, only used at serialization/deserializat...
unsigned int nTimeSmart
Stable timestamp that never changes, and reflects the order a transaction was added to the wallet.
void SetTx(CTransactionRef arg)
void Serialize(Stream &s) const
CWalletTx(CTransactionRef arg)
bool IsEquivalentTo(const CWalletTx &tx) const
void Unserialize(Stream &s)
bool isConflicted() const
@ AMOUNTTYPE_ENUM_ELEMENTS
std::vector< std::pair< std::string, std::string > > vOrderForm
bool fFromMe
From me flag is set to 1 for transactions that were created by the wallet on this bitcoin node,...
int64_t GetTxTime() const
unsigned int fTimeReceivedIsTxTime
CachableAmount m_amounts[AMOUNTTYPE_ENUM_ELEMENTS]
void MarkDirty()
make sure balances are recalculated
bool m_is_cache_empty
This flag is true if all m_amounts caches are empty.
std::multimap< int64_t, CWalletTx * >::const_iterator m_it_wtxOrdered
unsigned int nTimeReceived
time received by this node
int64_t nOrderPos
position in ordered transaction list
Implement std::hash so RCUPtr can be used as a key for maps or sets.
std::shared_ptr< const CTransaction > CTransactionRef
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
static std::string ToString(const CService &ip)
static constexpr Amount zero() noexcept
A BlockHash is a unqiue identifier for a block.
Confirmation includes tx status and a triplet of {block height/block hash/tx index in block} at which...
Confirmation(Status s=UNCONFIRMED, int b=0, BlockHash h=BlockHash(), int i=0)
Cachable amount subdivided into watchonly and spendable parts.
A TxId is the identifier of a transaction.
int64_t atoi64(const std::string &str)
static void ReadOrderPos(int64_t &nOrderPos, mapValue_t &mapValue)
std::map< std::string, std::string > mapValue_t
static void WriteOrderPos(const int64_t &nOrderPos, mapValue_t &mapValue)