Bitcoin Core 28.99.0
P2P Digital Currency
|
UI model for a transaction. More...
#include <transactionrecord.h>
Public Types | |
enum | Type { Other , Generated , SendToAddress , SendToOther , RecvWithAddress , RecvFromOther } |
Public Member Functions | |
TransactionRecord () | |
TransactionRecord (uint256 _hash, qint64 _time) | |
TransactionRecord (uint256 _hash, qint64 _time, Type _type, const std::string &_address, const CAmount &_debit, const CAmount &_credit) | |
QString | getTxHash () const |
Return the unique identifier for this transaction (part) More... | |
int | getOutputIndex () const |
Return the output index of the subtransaction More... | |
void | updateStatus (const interfaces::WalletTxStatus &wtx, const uint256 &block_hash, int numBlocks, int64_t block_time) |
Update status from core wallet tx. More... | |
bool | statusUpdateNeeded (const uint256 &block_hash) const |
Return whether a status update is needed. More... | |
Static Public Member Functions | |
static bool | showTransaction () |
Decompose CWallet transaction to model transaction records. More... | |
static QList< TransactionRecord > | decomposeTransaction (const interfaces::WalletTx &wtx) |
Public Attributes | |
int | idx |
Subtransaction index, for sort key. More... | |
TransactionStatus | status |
Status: can change with block chain update. More... | |
bool | involvesWatchAddress |
Whether the transaction was sent/received with a watch-only address. More... | |
Immutable transaction attributes | |
uint256 | hash |
qint64 | time |
Type | type |
std::string | address |
CAmount | debit |
CAmount | credit |
Static Public Attributes | |
static const int | RecommendedNumConfirmations = 6 |
Number of confirmation recommended for accepting a transaction. More... | |
UI model for a transaction.
A core transaction can be represented by multiple UI transactions if it has multiple outputs.
Definition at line 61 of file transactionrecord.h.
Enumerator | |
---|---|
Other | |
Generated | |
SendToAddress | |
SendToOther | |
RecvWithAddress | |
RecvFromOther |
Definition at line 64 of file transactionrecord.h.
|
inline |
|
inline |
Definition at line 82 of file transactionrecord.h.
|
inline |
Definition at line 88 of file transactionrecord.h.
|
static |
Definition at line 33 of file transactionrecord.cpp.
int TransactionRecord::getOutputIndex | ( | ) | const |
Return the output index of the subtransaction
Definition at line 231 of file transactionrecord.cpp.
QString TransactionRecord::getTxHash | ( | ) | const |
Return the unique identifier for this transaction (part)
Definition at line 226 of file transactionrecord.cpp.
|
static |
Decompose CWallet transaction to model transaction records.
Definition at line 23 of file transactionrecord.cpp.
bool TransactionRecord::statusUpdateNeeded | ( | const uint256 & | block_hash | ) | const |
Return whether a status update is needed.
Definition at line 220 of file transactionrecord.cpp.
void TransactionRecord::updateStatus | ( | const interfaces::WalletTxStatus & | wtx, |
const uint256 & | block_hash, | ||
int | numBlocks, | ||
int64_t | block_time | ||
) |
Update status from core wallet tx.
Definition at line 152 of file transactionrecord.cpp.
std::string TransactionRecord::address |
Definition at line 106 of file transactionrecord.h.
CAmount TransactionRecord::credit |
Definition at line 108 of file transactionrecord.h.
CAmount TransactionRecord::debit |
Definition at line 107 of file transactionrecord.h.
uint256 TransactionRecord::hash |
Definition at line 103 of file transactionrecord.h.
int TransactionRecord::idx |
Subtransaction index, for sort key.
Definition at line 112 of file transactionrecord.h.
bool TransactionRecord::involvesWatchAddress |
Whether the transaction was sent/received with a watch-only address.
Definition at line 118 of file transactionrecord.h.
|
static |
Number of confirmation recommended for accepting a transaction.
Definition at line 75 of file transactionrecord.h.
TransactionStatus TransactionRecord::status |
Status: can change with block chain update.
Definition at line 115 of file transactionrecord.h.
qint64 TransactionRecord::time |
Definition at line 104 of file transactionrecord.h.
Type TransactionRecord::type |
Definition at line 105 of file transactionrecord.h.