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) {
53 std::vector<uint256> vMerkleBranch;
56 s >> tx >> hashBlock >> vMerkleBranch >> nIndex;
193 template <
typename Stream>
void Serialize(Stream &s)
const {
196 mapValueCopy[
"fromaccount"] =
"";
203 std::vector<uint8_t> dummy_vector1;
205 std::vector<uint8_t> dummy_vector2;
207 bool dummy_bool =
false;
210 int serializedIndex =
212 s <<
tx << serializedHash << dummy_vector1 << serializedIndex
213 << dummy_vector2 << mapValueCopy <<
vOrderForm
221 std::vector<uint256> dummy_vector1;
223 std::vector<CMerkleTx> dummy_vector2;
242 }
else if (serializedIndex == -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
std::string ToString(const T &t)
Locale-independent version of std::to_string.
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)