 |
Bitcoin Core
21.99.0
P2P Digital Currency
|
Go to the documentation of this file.
5 #ifndef BITCOIN_QT_TRANSACTIONRECORD_H
6 #define BITCOIN_QT_TRANSACTIONRECORD_H
18 struct WalletTxStatus;
101 Type _type,
const std::string &_address,
147 #endif // BITCOIN_QT_TRANSACTIONRECORD_H
TransactionRecord(uint256 _hash, qint64 _time, Type _type, const std::string &_address, const CAmount &_debit, const CAmount &_credit)
bool statusUpdateNeeded(const uint256 &block_hash) const
Return whether a status update is needed.
QString getTxHash() const
Return the unique identifier for this transaction (part)
int idx
Subtransaction index, for sort key.
static QList< TransactionRecord > decomposeTransaction(const interfaces::WalletTx &wtx)
std::string sortKey
Sorting key based on status.
@ OpenUntilDate
Normal (sent/received) transactions.
TransactionRecord(uint256 _hash, qint64 _time)
TransactionStatus status
Status: can change with block chain update.
@ Conflicted
Conflicts with other transaction or mempool.
static const int RecommendedNumConfirmations
Number of confirmation recommended for accepting a transaction.
UI model for a transaction.
uint256 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...
bool involvesWatchAddress
Whether the transaction was sent/received with a watch-only address.
int64_t CAmount
Amount in satoshis (Can be negative)
Updated transaction status.
@ Abandoned
Abandoned from the wallet.
@ Immature
Generated (mined) transactions.
@ OpenUntilBlock
Transaction not yet final, waiting for block.
@ Confirmed
Have 6 or more confirmations (normal tx) or fully mature (mined tx)
UI model for transaction status.
@ Confirming
Confirmed, but waiting for the recommended number of confirmations.
int getOutputIndex() const
Return the output index of the subtransaction
@ NotAccepted
Mined but not accepted.
bool countsForBalance
Transaction counts towards available balance.
@ Unconfirmed
Not yet mined into a block.
void updateStatus(const interfaces::WalletTxStatus &wtx, const uint256 &block_hash, int numBlocks, int64_t block_time)
Update status from core wallet tx.
static bool showTransaction()
Decompose CWallet transaction to model transaction records.