5#ifndef BITCOIN_QT_TRANSACTIONRECORD_H
6#define BITCOIN_QT_TRANSACTIONRECORD_H
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.
TransactionRecord(TxId _txid, qint64 _time)
QString getTxID() const
Return the unique identifier for this transaction (part)
bool involvesWatchAddress
Whether the transaction was sent/received with a watch-only address.
TransactionRecord(TxId _txid, qint64 _time, Type _type, const std::string &_address, const Amount _debit, const Amount _credit)
UI model for transaction status.
bool countsForBalance
Transaction counts towards available balance.
BlockHash m_cur_block_hash
Current block hash (to know whether cached status is still valid)
qint64 open_for
Timestamp if status==OpenUntilDate, otherwise number of additional blocks that need to be mined befor...
@ 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.
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...
A BlockHash is a unqiue identifier for a block.
A TxId is the identifier of a transaction.
Updated transaction status.