Skip to content

Commit b0ffe4e

Browse files
committed
qt: refactor TransactionStatus
1 parent 0b234f9 commit b0ffe4e

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

src/qt/transactionrecord.h

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,7 @@ struct WalletTxStatus;
2020

2121
/** UI model for transaction status. The transaction status is the part of a transaction that will change over time.
2222
*/
23-
class TransactionStatus
24-
{
25-
public:
26-
TransactionStatus() : countsForBalance(false), sortKey(""),
27-
matures_in(0), status(Unconfirmed), depth(0), open_for(0)
28-
{ }
23+
struct TransactionStatus {
2924

3025
enum Status {
3126
Confirmed, /**< Have 6 or more confirmations (normal tx) or fully mature (mined tx) **/
@@ -40,22 +35,19 @@ class TransactionStatus
4035
};
4136

4237
/// Transaction counts towards available balance
43-
bool countsForBalance;
38+
bool countsForBalance{false};
4439
/// Sorting key based on status
4540
std::string sortKey;
4641

4742
/** @name Generated (mined) transactions
4843
@{*/
49-
int matures_in;
44+
int matures_in{0};
5045
/**@}*/
5146

5247
/** @name Reported status
5348
@{*/
54-
Status status;
55-
qint64 depth;
56-
qint64 open_for; /**< Timestamp if status==OpenUntilDate, otherwise number
57-
of additional blocks that need to be mined before
58-
finalization */
49+
Status status{Unconfirmed};
50+
qint64 depth{0};
5951
/**@}*/
6052

6153
/** Current block hash (to know whether cached status is still valid) */

0 commit comments

Comments
 (0)