mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-13 10:21:34 +02:00
qt, refactor: Use member initializers in TransactionStatus
This commit is contained in:
parent
66d58ad7a9
commit
343f83d088
@ -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.
|
/** UI model for transaction status. The transaction status is the part of a transaction that will change over time.
|
||||||
*/
|
*/
|
||||||
class TransactionStatus
|
struct TransactionStatus {
|
||||||
{
|
|
||||||
public:
|
|
||||||
TransactionStatus() : countsForBalance(false), sortKey(""),
|
|
||||||
matures_in(0), status(Unconfirmed), depth(0), open_for(0)
|
|
||||||
{ }
|
|
||||||
|
|
||||||
enum Status {
|
enum Status {
|
||||||
Confirmed, /**< Have 6 or more confirmations (normal tx) or fully mature (mined tx) **/
|
Confirmed, /**< Have 6 or more confirmations (normal tx) or fully mature (mined tx) **/
|
||||||
/// Normal (sent/received) transactions
|
/// Normal (sent/received) transactions
|
||||||
@ -40,25 +34,25 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
/// Transaction counts towards available balance
|
/// Transaction counts towards available balance
|
||||||
bool countsForBalance;
|
bool countsForBalance{false};
|
||||||
/// Sorting key based on status
|
/// Sorting key based on status
|
||||||
std::string sortKey;
|
std::string sortKey;
|
||||||
|
|
||||||
/** @name Generated (mined) transactions
|
/** @name Generated (mined) transactions
|
||||||
@{*/
|
@{*/
|
||||||
int matures_in;
|
int matures_in{0};
|
||||||
/**@}*/
|
/**@}*/
|
||||||
|
|
||||||
/** @name Reported status
|
/** @name Reported status
|
||||||
@{*/
|
@{*/
|
||||||
Status status;
|
Status status{Unconfirmed};
|
||||||
qint64 depth;
|
qint64 depth{0};
|
||||||
/**@}*/
|
/**@}*/
|
||||||
|
|
||||||
/** Current block hash (to know whether cached status is still valid) */
|
/** Current block hash (to know whether cached status is still valid) */
|
||||||
uint256 m_cur_block_hash{};
|
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
|
/** UI model for a transaction. A core transaction can be represented by multiple UI transactions if it has
|
||||||
|
Loading…
x
Reference in New Issue
Block a user