9#include <chainparams.h>
31QList<TransactionRecord>
33 QList<TransactionRecord> parts;
34 int64_t nTime = wtx.
time;
37 Amount nNet = nCredit - nDebit;
39 std::map<std::string, std::string> mapValue = wtx.
value_map;
45 for (
size_t i = 0; i < wtx.
tx->vout.size(); i++) {
46 const CTxOut &txout = wtx.
tx->vout[i];
79 if (fAllFromMe > mine) {
89 if (fAllToMe > mine) {
94 if (fAllFromMe && fAllToMe) {
107 -(nDebit - nChange), nCredit - nChange));
111 }
else if (fAllFromMe) {
115 Amount nTxFee = nDebit - wtx.
tx->GetValueOut();
117 for (
size_t nOut = 0; nOut < wtx.
tx->vout.size(); nOut++) {
118 const CTxOut &txout = wtx.
tx->vout[nOut];
129 if (!std::get_if<CNoDestination>(&wtx.
txout_address[nOut])) {
146 sub.
debit = -1 * nValue;
165 const BlockHash &block_hash,
int numBlocks,
166 int64_t block_time) {
std::string EncodeCashAddr(const CTxDestination &dst, const CChainParams ¶ms)
const CChainParams & Params()
Return the currently selected parameters.
An output of a transaction.
UI model for a transaction.
int idx
Subtransaction index, for sort key.
static QList< TransactionRecord > decomposeTransaction(const interfaces::WalletTx &wtx)
Decompose CWallet transaction to model transaction records.
static const int RecommendedNumConfirmations
Number of confirmation recommended for accepting a transaction.
static bool showTransaction()
Decompose CWallet transaction to model transaction records.
TransactionStatus status
Status: can change with block chain update.
int getOutputIndex() const
Return the output index of the subtransaction
void updateStatus(const interfaces::WalletTxStatus &wtx, const BlockHash &block_hash, int numBlocks, int64_t block_time)
Update status from core wallet tx.
bool statusUpdateNeeded(const BlockHash &block_hash) const
Return whether a status update is needed.
QString getTxID() const
Return the unique identifier for this transaction (part)
bool involvesWatchAddress
Whether the transaction was sent/received with a watch-only address.
bool countsForBalance
Transaction counts towards available balance.
BlockHash m_cur_block_hash
Current block hash (to know whether cached status is still valid)
@ Confirmed
Have 6 or more confirmations (normal tx) or fully mature (mined tx)
@ Unconfirmed
Normal (sent/received) transactions.
@ Immature
Generated (mined) transactions.
@ Confirming
Confirmed, but waiting for the recommended number of confirmations.
@ NotAccepted
Mined but not accepted.
@ Conflicted
Conflicts with other transaction or mempool.
@ Abandoned
Abandoned from the wallet.
std::string sortKey
Sorting key based on status.
std::string ToString() const
isminetype
IsMine() return codes.
static constexpr Amount zero() noexcept
A BlockHash is a unqiue identifier for a block.
A TxId is the identifier of a transaction.
std::vector< CTxDestination > txout_address
std::vector< isminetype > txout_is_mine
std::map< std::string, std::string > value_map
std::vector< isminetype > txout_address_is_mine
std::vector< isminetype > txin_is_mine
Updated transaction status.
unsigned int time_received