mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 18:53:23 -03:00
qt, refactor: Use member initializers in TransactionStatus
This commit is contained in:
parent
66d58ad7a9
commit
343f83d088
1 changed files with 6 additions and 12 deletions
|
@ -20,13 +20,7 @@ struct WalletTxStatus;
|
|||
|
||||
/** UI model for transaction status. The transaction status is the part of a transaction that will change over time.
|
||||
*/
|
||||
class TransactionStatus
|
||||
{
|
||||
public:
|
||||
TransactionStatus() : countsForBalance(false), sortKey(""),
|
||||
matures_in(0), status(Unconfirmed), depth(0), open_for(0)
|
||||
{ }
|
||||
|
||||
struct TransactionStatus {
|
||||
enum Status {
|
||||
Confirmed, /**< Have 6 or more confirmations (normal tx) or fully mature (mined tx) **/
|
||||
/// Normal (sent/received) transactions
|
||||
|
@ -40,25 +34,25 @@ public:
|
|||
};
|
||||
|
||||
/// Transaction counts towards available balance
|
||||
bool countsForBalance;
|
||||
bool countsForBalance{false};
|
||||
/// Sorting key based on status
|
||||
std::string sortKey;
|
||||
|
||||
/** @name Generated (mined) transactions
|
||||
@{*/
|
||||
int matures_in;
|
||||
int matures_in{0};
|
||||
/**@}*/
|
||||
|
||||
/** @name Reported status
|
||||
@{*/
|
||||
Status status;
|
||||
qint64 depth;
|
||||
Status status{Unconfirmed};
|
||||
qint64 depth{0};
|
||||
/**@}*/
|
||||
|
||||
/** Current block hash (to know whether cached status is still valid) */
|
||||
uint256 m_cur_block_hash{};
|
||||
|
||||
bool needsUpdate;
|
||||
bool needsUpdate{false};
|
||||
};
|
||||
|
||||
/** UI model for a transaction. A core transaction can be represented by multiple UI transactions if it has
|
||||
|
|
Loading…
Add table
Reference in a new issue