Raven Core  3.0.0
P2P Digital Currency
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
TransactionRecord Class Reference

UI model for a transaction. More...

#include <transactionrecord.h>

Collaboration diagram for TransactionRecord:
[legend]

Public Types

enum  Type {
  Other, Generated, SendToAddress, SendToOther,
  RecvWithAddress, RecvFromOther, SendToSelf, Issue,
  Reissue, TransferTo, TransferFrom
}
 

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
 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)
 Update status from core wallet tx. More...
 
bool statusUpdateNeeded () 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 address
 
CAmount debit
 
CAmount credit
 
std::string assetName
 
uint8_t units
 

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

Member Enumeration Documentation

◆ Type

Enumerator
Other 
Generated 
SendToAddress 
SendToOther 
RecvWithAddress 
RecvFromOther 
SendToSelf 
Issue 
Reissue 
TransferTo 
TransferFrom 

Definition at line 75 of file transactionrecord.h.

Constructor & Destructor Documentation

◆ TransactionRecord() [1/3]

TransactionRecord::TransactionRecord ( )
inline

Definition at line 93 of file transactionrecord.h.

Here is the caller graph for this function:

◆ TransactionRecord() [2/3]

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

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

Member Function Documentation

◆ decomposeTransaction()

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

RVN START

RVN START

RVN START

RVN START

RVN START

RVN START

RVN START

RVN START

RVN START

RVN END

Definition at line 31 of file transactionrecord.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getOutputIndex()

int TransactionRecord::getOutputIndex ( ) const

Return the output index of the subtransaction.

Definition at line 401 of file transactionrecord.cpp.

Here is the caller graph for this function:

◆ getTxID()

QString TransactionRecord::getTxID ( ) const

Return the unique identifier for this transaction (part)

Definition at line 396 of file transactionrecord.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ showTransaction()

bool TransactionRecord::showTransaction ( const CWalletTx wtx)
static

Decompose CWallet transaction to model transaction records.

Definition at line 20 of file transactionrecord.cpp.

Here is the caller graph for this function:

◆ statusUpdateNeeded()

bool TransactionRecord::statusUpdateNeeded ( ) const

Return whether a status update is needed.

Definition at line 390 of file transactionrecord.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateStatus()

void TransactionRecord::updateStatus ( const CWalletTx wtx)

Update status from core wallet tx.

Definition at line 303 of file transactionrecord.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ address

std::string TransactionRecord::address

Definition at line 122 of file transactionrecord.h.

◆ assetName

std::string TransactionRecord::assetName

Definition at line 125 of file transactionrecord.h.

◆ credit

CAmount TransactionRecord::credit

Definition at line 124 of file transactionrecord.h.

◆ debit

CAmount TransactionRecord::debit

Definition at line 123 of file transactionrecord.h.

◆ hash

uint256 TransactionRecord::hash

Definition at line 119 of file transactionrecord.h.

◆ idx

int TransactionRecord::idx

Subtransaction index, for sort key.

Definition at line 130 of file transactionrecord.h.

◆ involvesWatchAddress

bool TransactionRecord::involvesWatchAddress

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

Definition at line 136 of file transactionrecord.h.

◆ RecommendedNumConfirmations

const int TransactionRecord::RecommendedNumConfirmations = 6
static

Number of confirmation recommended for accepting a transaction.

Definition at line 91 of file transactionrecord.h.

◆ status

TransactionStatus TransactionRecord::status

Status: can change with block chain update.

Definition at line 133 of file transactionrecord.h.

◆ time

qint64 TransactionRecord::time

Definition at line 120 of file transactionrecord.h.

◆ type

Type TransactionRecord::type

Definition at line 121 of file transactionrecord.h.

◆ units

uint8_t TransactionRecord::units

Definition at line 126 of file transactionrecord.h.


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