#ifndef TRANSACTIONRECORD_H
#define TRANSACTIONRECORD_H
-#include "main.h"
+#include "uint256.h"
#include <QList>
+class CWallet;
+class CWalletTx;
+
class TransactionStatus
{
public:
Other,
Generated,
SendToAddress,
- SendToIP,
+ SendToOther,
RecvWithAddress,
- RecvFromIP,
+ RecvFromOther,
SendToSelf
};
+ /* Number of confirmation needed for transaction */
+ static const int NumConfirmations = 6;
+
TransactionRecord():
hash(), time(0), type(Other), address(""), debit(0), credit(0), idx(0)
{
/* Decompose CWallet transaction to model transaction records.
*/
static bool showTransaction(const CWalletTx &wtx);
- static QList<TransactionRecord> decomposeTransaction(const CWalletTx &wtx);
+ static QList<TransactionRecord> decomposeTransaction(const CWallet *wallet, const CWalletTx &wtx);
/* Fixed */
uint256 hash;
/* Status: can change with block chain update */
TransactionStatus status;
+ /* Return the unique identifier for this transaction (part) */
+ std::string getTxID();
+
/* Update status from wallet tx.
*/
void updateStatus(const CWalletTx &wtx);