29 QList<TransactionRecord> parts;
30 int64_t nTime = wtx.
time;
33 CAmount nNet = nCredit - nDebit;
35 std::map<std::string, std::string> mapValue = wtx.
value_map;
37 bool all_from_me =
true;
38 bool any_from_me =
false;
44 all_from_me = all_from_me && mine;
45 if (mine) any_from_me =
true;
49 if (all_from_me || !any_from_me) {
50 CAmount nTxFee = nDebit - wtx.
tx->GetValueOut();
52 for(
unsigned int i = 0; i < wtx.
tx->vout.size(); i++)
54 const CTxOut& txout = wtx.
tx->vout[i];
115 sub.
address = mapValue[
"from"];
int64_t CAmount
Amount in satoshis (Can be negative)
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)
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
QString getTxHash() const
Return the unique identifier for this transaction (part)
bool statusUpdateNeeded(const uint256 &block_hash) const
Return whether a status update is needed.
void updateStatus(const interfaces::WalletTxStatus &wtx, const uint256 &block_hash, int numBlocks, int64_t block_time)
Update status from core wallet tx.
constexpr bool IsNull() const
std::string ToString() const
std::string EncodeDestination(const CTxDestination &dest)
bool countsForBalance
Transaction counts towards available balance.
uint256 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::vector< bool > txin_is_mine
std::vector< CTxDestination > txout_address
std::vector< bool > txout_address_is_mine
std::vector< bool > txout_is_change
std::map< std::string, std::string > value_map
std::vector< bool > txout_is_mine
Updated transaction status.
unsigned int time_received