Bitcoin ABC 0.26.3
P2P Digital Currency
|
UI model for a transaction. More...
#include <transactionrecord.h>
Public Types | |
enum | Type { Other , Generated , SendToAddress , SendToOther , RecvWithAddress , RecvFromOther , SendToSelf } |
Public Member Functions | |
TransactionRecord () | |
TransactionRecord (TxId _txid, qint64 _time) | |
TransactionRecord (TxId _txid, qint64 _time, Type _type, const std::string &_address, const Amount _debit, const Amount _credit) | |
QString | getTxID () const |
Return the unique identifier for this transaction (part) | |
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. | |
Static Public Member Functions | |
static bool | showTransaction () |
Decompose CWallet transaction to model transaction records. | |
static QList< TransactionRecord > | decomposeTransaction (const interfaces::WalletTx &wtx) |
Decompose CWallet transaction to model transaction records. | |
Public Attributes | |
int | idx |
Subtransaction index, for sort key. | |
TransactionStatus | status |
Status: can change with block chain update. | |
bool | involvesWatchAddress |
Whether the transaction was sent/received with a watch-only address. | |
Immutable transaction attributes | |
TxId | txid |
qint64 | time |
Type | type |
std::string | address |
Amount | debit |
Amount | credit |
Static Public Attributes | |
static const int | RecommendedNumConfirmations = 6 |
Number of confirmation recommended for accepting a transaction. | |
UI model for a transaction.
A core transaction can be represented by multiple UI transactions if it has multiple outputs.
Definition at line 87 of file transactionrecord.h.
Enumerator | |
---|---|
Other | |
Generated | |
SendToAddress | |
SendToOther | |
RecvWithAddress | |
RecvFromOther | |
SendToSelf |
Definition at line 89 of file transactionrecord.h.
|
inline |
Definition at line 106 of file transactionrecord.h.
|
inline |
Definition at line 110 of file transactionrecord.h.
|
static |
Decompose CWallet transaction to model transaction records.
Definition at line 32 of file transactionrecord.cpp.
int TransactionRecord::getOutputIndex | ( | ) | const |
Return the output index of the subtransaction
Definition at line 214 of file transactionrecord.cpp.
QString TransactionRecord::getTxID | ( | ) | const |
Return the unique identifier for this transaction (part)
Definition at line 210 of file transactionrecord.cpp.
|
static |
Decompose CWallet transaction to model transaction records.
Return positive answer if transaction should be shown in list.
Definition at line 22 of file transactionrecord.cpp.
Return whether a status update is needed.
Definition at line 205 of file transactionrecord.cpp.
void TransactionRecord::updateStatus | ( | const interfaces::WalletTxStatus & | wtx, |
const BlockHash & | block_hash, | ||
int | numBlocks, | ||
int64_t | block_time | ||
) |
Update status from core wallet tx.
Definition at line 164 of file transactionrecord.cpp.
std::string TransactionRecord::address |
Definition at line 127 of file transactionrecord.h.
Amount TransactionRecord::credit |
Definition at line 129 of file transactionrecord.h.
Amount TransactionRecord::debit |
Definition at line 128 of file transactionrecord.h.
int TransactionRecord::idx |
Subtransaction index, for sort key.
Definition at line 133 of file transactionrecord.h.
bool TransactionRecord::involvesWatchAddress |
Whether the transaction was sent/received with a watch-only address.
Definition at line 139 of file transactionrecord.h.
|
static |
Number of confirmation recommended for accepting a transaction.
Definition at line 100 of file transactionrecord.h.
TransactionStatus TransactionRecord::status |
Status: can change with block chain update.
Definition at line 136 of file transactionrecord.h.
qint64 TransactionRecord::time |
Definition at line 125 of file transactionrecord.h.
TxId TransactionRecord::txid |
Definition at line 124 of file transactionrecord.h.
Type TransactionRecord::type |
Definition at line 126 of file transactionrecord.h.