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
62 /* Number of confirmation needed for transaction */
63 static const int NumConfirmations = 6;
66 hash(), time(0), type(Other), address(""), debit(0), credit(0), idx(0)
70 TransactionRecord(uint256 hash, int64 time):
71 hash(hash), time(time), type(Other), address(""), debit(0),
76 TransactionRecord(uint256 hash, int64 time,
77 Type type, const std::string &address,
78 int64 debit, int64 credit):
79 hash(hash), time(time), type(type), address(address), debit(debit), credit(credit),
84 /* Decompose CWallet transaction to model transaction records.
86 static bool showTransaction(const CWalletTx &wtx);
87 static QList<TransactionRecord> decomposeTransaction(const CWalletTx &wtx);
97 /* Subtransaction index, for sort key */
100 /* Status: can change with block chain update */
101 TransactionStatus status;
103 /* Update status from wallet tx.
105 void updateStatus(const CWalletTx &wtx);
107 /* Is a status update needed?
109 bool statusUpdateNeeded();
112 #endif // TRANSACTIONRECORD_H