1 #ifndef TRANSACTIONRECORD_H
2 #define TRANSACTIONRECORD_H
8 class TransactionStatus
12 confirmed(false), sortKey(""), maturity(Mature),
13 matures_in(0), status(Offline), depth(0), open_for(0), cur_num_blocks(-1)
20 MaturesWarning, /* Will likely not mature because no nodes have confirmed */
35 /* For "Generated" transactions */
42 int64 open_for; /* Timestamp if status==OpenUntilDate, otherwise number of blocks */
44 /* Current number of blocks (to know whether cached status is still valid. */
48 class TransactionRecord
63 hash(), time(0), type(Other), address(""), debit(0), credit(0), idx(0)
67 TransactionRecord(uint256 hash, int64 time):
68 hash(hash), time(time), type(Other), address(""), debit(0),
73 TransactionRecord(uint256 hash, int64 time,
74 Type type, const std::string &address,
75 int64 debit, int64 credit):
76 hash(hash), time(time), type(type), address(address), debit(debit), credit(credit),
81 /* Decompose CWallet transaction to model transaction records.
83 static bool showTransaction(const CWalletTx &wtx);
84 static QList<TransactionRecord> decomposeTransaction(const CWalletTx &wtx);
94 /* Subtransaction index, for sort key */
97 /* Status: can change with block chain update */
98 TransactionStatus status;
100 /* Update status from wallet tx.
102 void updateStatus(const CWalletTx &wtx);
104 /* Is a status update needed?
106 bool statusUpdateNeeded();
109 #endif // TRANSACTIONRECORD_H