Dash Core  0.12.2.1
P2P Digital Currency
TransactionRecord Class Reference

#include <transactionrecord.h>

Public Types

enum  Type {
  Other, Generated, SendToAddress, SendToOther,
  RecvWithAddress, RecvFromOther, SendToSelf, RecvWithPrivateSend,
  PrivateSendDenominate, PrivateSendCollateralPayment, PrivateSendMakeCollaterals, PrivateSendCreateDenominations,
  PrivateSend
}
 

Public Member Functions

 TransactionRecord ()
 
 TransactionRecord (uint256 hash, qint64 time)
 
 TransactionRecord (uint256 hash, qint64 time, Type type, const std::string &address, const CAmount &debit, const CAmount &credit)
 
QString getTxID () const
 
void updateStatus (const CWalletTx &wtx)
 
bool statusUpdateNeeded ()
 

Static Public Member Functions

static bool showTransaction (const CWalletTx &wtx)
 
static QList< TransactionRecorddecomposeTransaction (const CWallet *wallet, const CWalletTx &wtx)
 
static QString formatSubTxId (const uint256 &hash, int vout)
 

Public Attributes

int idx
 
TransactionStatus status
 
bool involvesWatchAddress
 
Immutable transaction attributes
uint256 hash
 
qint64 time
 
Type type
 
std::string address
 
CAmount debit
 
CAmount credit
 

Static Public Attributes

static const int RecommendedNumConfirmations = 6
 

Detailed Description

UI model for a transaction. A core transaction can be represented by multiple UI transactions if it has multiple outputs.

Definition at line 72 of file transactionrecord.h.

Member Enumeration Documentation

◆ Type

Enumerator
Other 
Generated 
SendToAddress 
SendToOther 
RecvWithAddress 
RecvFromOther 
SendToSelf 
RecvWithPrivateSend 
PrivateSendDenominate 
PrivateSendCollateralPayment 
PrivateSendMakeCollaterals 
PrivateSendCreateDenominations 
PrivateSend 

Definition at line 75 of file transactionrecord.h.

Constructor & Destructor Documentation

◆ TransactionRecord() [1/3]

TransactionRecord::TransactionRecord ( )
inline

Definition at line 95 of file transactionrecord.h.

Referenced by decomposeTransaction().

◆ TransactionRecord() [2/3]

TransactionRecord::TransactionRecord ( uint256  hash,
qint64  time 
)
inline

Definition at line 100 of file transactionrecord.h.

◆ TransactionRecord() [3/3]

TransactionRecord::TransactionRecord ( uint256  hash,
qint64  time,
Type  type,
const std::string &  address,
const CAmount debit,
const CAmount credit 
)
inline

Definition at line 106 of file transactionrecord.h.

Member Function Documentation

◆ decomposeTransaction()

QList< TransactionRecord > TransactionRecord::decomposeTransaction ( const CWallet wallet,
const CWalletTx wtx 
)
static

◆ formatSubTxId()

QString TransactionRecord::formatSubTxId ( const uint256 hash,
int  vout 
)
static

Format subtransaction id

Definition at line 330 of file transactionrecord.cpp.

Referenced by getTxID(), and TransactionDesc::toHTML().

◆ getTxID()

QString TransactionRecord::getTxID ( ) const

Return the unique identifier for this transaction (part)

Definition at line 325 of file transactionrecord.cpp.

Referenced by TransactionTableModel::data().

◆ showTransaction()

bool TransactionRecord::showTransaction ( const CWalletTx wtx)
static

Decompose CWallet transaction to model transaction records.

Definition at line 23 of file transactionrecord.cpp.

Referenced by NotifyTransactionChanged(), and TransactionTablePriv::refreshWallet().

◆ statusUpdateNeeded()

bool TransactionRecord::statusUpdateNeeded ( )

Return whether a status update is needed.

Definition at line 319 of file transactionrecord.cpp.

Referenced by TransactionTablePriv::index().

◆ updateStatus()

void TransactionRecord::updateStatus ( const CWalletTx wtx)

Update status from core wallet tx.

Definition at line 231 of file transactionrecord.cpp.

Referenced by TransactionTablePriv::index().

Member Data Documentation

◆ address

◆ credit

CAmount TransactionRecord::credit

◆ debit

CAmount TransactionRecord::debit

◆ hash

◆ idx

int TransactionRecord::idx

Subtransaction index, for sort key

Definition at line 130 of file transactionrecord.h.

Referenced by decomposeTransaction(), getTxID(), TransactionDesc::toHTML(), and updateStatus().

◆ involvesWatchAddress

bool TransactionRecord::involvesWatchAddress

Whether the transaction was sent/received with a watch-only address

Definition at line 136 of file transactionrecord.h.

Referenced by TransactionTableModel::data(), decomposeTransaction(), TransactionTableModel::formatTxToAddress(), and TransactionTableModel::txWatchonlyDecoration().

◆ RecommendedNumConfirmations

const int TransactionRecord::RecommendedNumConfirmations = 6
static

Number of confirmation recommended for accepting a transaction

Definition at line 93 of file transactionrecord.h.

Referenced by TransactionTableModel::formatTxStatus(), and updateStatus().

◆ status

◆ time

qint64 TransactionRecord::time

◆ type


The documentation for this class was generated from the following files: