5#ifndef BITCOIN_WALLET_TRANSACTION_H
6#define BITCOIN_WALLET_TRANSACTION_H
30 template<
typename Stream>
35 std::vector<uint256> vMerkleBranch;
38 s >> tx >> hashBlock >> vMerkleBranch >> nIndex;
81 std::vector<std::pair<std::string, std::string> >
vOrderForm;
171 template<
typename Stream>
176 mapValueCopy[
"fromaccount"] =
"";
184 std::vector<uint8_t> dummy_vector1;
185 std::vector<uint8_t> dummy_vector2;
186 bool dummy_bool =
false;
192 template<
typename Stream>
197 std::vector<uint256> dummy_vector1;
198 std::vector<CMerkleTx> dummy_vector2;
212 }
else if (serializedIndex == -1) {
219 const auto it_op =
mapValue.find(
"n");
220 nOrderPos = (it_op !=
mapValue.end()) ? LocaleIndependentAtoi<int64_t>(it_op->second) : -1;
221 const auto it_ts =
mapValue.find(
"timesmart");
222 nTimeSmart = (it_ts !=
mapValue.end()) ?
static_cast<unsigned int>(LocaleIndependentAtoi<int64_t>(it_ts->second)) : 0;
int64_t CAmount
Amount in satoshis (Can be negative)
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
True if only scriptSigs are different.
void Unserialize(Stream &s)
bool isConflicted() const
@ AMOUNTTYPE_ENUM_ELEMENTS
const uint256 & GetHash() const
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
std::shared_ptr< const CTransaction > CTransactionRef
std::string ToString(const T &t)
Locale-independent version of std::to_string.
Confirmation includes tx status and a triplet of {block height/block hash/tx index in block} at which...
Confirmation(Status status=UNCONFIRMED, int block_height=0, uint256 block_hash=uint256(), int block_index=0)
Cachable amount subdivided into watchonly and spendable parts.
std::map< std::string, std::string > mapValue_t