Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

UI model for a transaction. More...

#include <transactionrecord.h>

+ Collaboration diagram for TransactionRecord:

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 &_strAddress, const CAmount &_debit, const CAmount &_credit)
 
QString getTxID () const
 Return the unique identifier for this transaction (part) More...
 
int getOutputIndex () const
 Return the output index of the subtransaction. More...
 
void updateStatus (const CWalletTx &wtx, int chainLockHeight)
 Update status from core wallet tx. More...
 
bool statusUpdateNeeded (int chainLockHeight) const
 Return whether a status update is needed. More...
 

Static Public Member Functions

static bool showTransaction (const CWalletTx &wtx)
 Decompose CWallet transaction to model transaction records. More...
 
static QList< TransactionRecorddecomposeTransaction (const CWallet *wallet, const CWalletTx &wtx)
 

Public Attributes

int idx
 Subtransaction index, for sort key. More...
 
TransactionStatus status
 Status: can change with block chain update. More...
 
bool involvesWatchAddress
 Whether the transaction was sent/received with a watch-only address. More...
 
Immutable transaction attributes
uint256 hash
 
qint64 time
 
Type type
 
std::string strAddress
 
CTxDestination txDest
 
CAmount debit
 
CAmount credit
 

Static Public Attributes

static const int RecommendedNumConfirmations = 6
 Number of confirmation recommended for accepting a transaction. More...
 

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 80 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 83 of file transactionrecord.h.

Constructor & Destructor Documentation

◆ TransactionRecord() [1/3]

TransactionRecord::TransactionRecord ( )
inline

Definition at line 103 of file transactionrecord.h.

References DecodeDestination(), strAddress, and txDest.

Referenced by decomposeTransaction().

◆ TransactionRecord() [2/3]

TransactionRecord::TransactionRecord ( uint256  _hash,
qint64  _time 
)
inline

Definition at line 109 of file transactionrecord.h.

References DecodeDestination(), strAddress, and txDest.

◆ TransactionRecord() [3/3]

TransactionRecord::TransactionRecord ( uint256  _hash,
qint64  _time,
Type  _type,
const std::string &  _strAddress,
const CAmount _debit,
const CAmount _credit 
)
inline

Definition at line 116 of file transactionrecord.h.

References DecodeDestination(), strAddress, and txDest.

Member Function Documentation

◆ decomposeTransaction()

◆ getOutputIndex()

int TransactionRecord::getOutputIndex ( ) const

Return the output index of the subtransaction.

Definition at line 383 of file transactionrecord.cpp.

References idx.

Referenced by TransactionDesc::toHTML().

◆ getTxID()

QString TransactionRecord::getTxID ( ) const

Return the unique identifier for this transaction (part)

Definition at line 378 of file transactionrecord.cpp.

References hash, and base_blob< BITS >::ToString().

Referenced by TransactionTableModel::data(), and TransactionDesc::toHTML().

◆ showTransaction()

bool TransactionRecord::showTransaction ( const CWalletTx wtx)
static

Decompose CWallet transaction to model transaction records.

Definition at line 21 of file transactionrecord.cpp.

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

◆ statusUpdateNeeded()

bool TransactionRecord::statusUpdateNeeded ( int  chainLockHeight) const

◆ updateStatus()

Member Data Documentation

◆ credit

CAmount TransactionRecord::credit

◆ debit

CAmount TransactionRecord::debit

◆ hash

◆ idx

int TransactionRecord::idx

Subtransaction index, for sort key.

Definition at line 143 of file transactionrecord.h.

Referenced by decomposeTransaction(), getOutputIndex(), and updateStatus().

◆ involvesWatchAddress

bool TransactionRecord::involvesWatchAddress

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

Definition at line 149 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 101 of file transactionrecord.h.

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

◆ status

◆ strAddress

◆ time

qint64 TransactionRecord::time

◆ txDest

◆ type


The documentation for this class was generated from the following files:
Released under the MIT license