PRCYCoin  2.0.0.7rc1
P2P Digital Currency
Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | Private Attributes | Friends | List of all members
CTransaction Class Reference

The basic transaction that is broadcasted on the network and contained in blocks. More...

#include <transaction.h>

Inheritance diagram for CTransaction:
[legend]
Collaboration diagram for CTransaction:
[legend]

Public Member Functions

 CTransaction ()
 Construct a CTransaction that qualifies as IsNull() More...
 
 CTransaction (const CMutableTransaction &tx)
 Convert a CMutableTransaction into a CTransaction. More...
 
CTransactionoperator= (const CTransaction &tx)
 
template<typename Stream , typename Operation >
void SerializationOp (Stream &s, Operation ser_action, int nType, int nVersion)
 
bool IsNull () const
 
const uint256GetHash () const
 
CAmount GetValueOut () const
 
double ComputePriority (double dPriorityInputs, unsigned int nTxSize=0) const
 
unsigned int CalculateModifiedSize (unsigned int nTxSize=0) const
 
bool UsesUTXO (const COutPoint out)
 
std::list< COutPointGetOutPoints () const
 
bool IsCoinBase () const
 
bool IsCoinAudit () const
 
bool IsCoinStake () const
 
std::string ToString () const
 

Public Attributes

const int32_t nVersion
 
std::vector< CTxInvin
 
std::vector< CTxOutvout
 
const uint32_t nLockTime
 
CKey txPrivM
 
char hasPaymentID
 
uint64_t paymentID
 
uint32_t txType
 
std::vector< unsigned char > bulletproofs
 
CAmount nTxFee
 
uint256 c
 
std::vector< std::vector< uint256 > > S
 
CKeyImage ntxFeeKeyImage
 
 ADD_SERIALIZE_METHODS
 

Static Public Attributes

static const int32_t CURRENT_VERSION =1
 

Private Member Functions

void UpdateHash () const
 

Private Attributes

const uint256 hash
 Memory only. More...
 

Friends

bool operator== (const CTransaction &a, const CTransaction &b)
 
bool operator!= (const CTransaction &a, const CTransaction &b)
 

Detailed Description

The basic transaction that is broadcasted on the network and contained in blocks.

A transaction can contain multiple inputs and outputs.

Definition at line 269 of file transaction.h.

Constructor & Destructor Documentation

◆ CTransaction() [1/2]

CTransaction::CTransaction ( )

Construct a CTransaction that qualifies as IsNull()

Definition at line 118 of file transaction.cpp.

◆ CTransaction() [2/2]

CTransaction::CTransaction ( const CMutableTransaction tx)

Convert a CMutableTransaction into a CTransaction.

Definition at line 120 of file transaction.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ CalculateModifiedSize()

unsigned int CTransaction::CalculateModifiedSize ( unsigned int  nTxSize = 0) const

Definition at line 199 of file transaction.cpp.

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

◆ ComputePriority()

double CTransaction::ComputePriority ( double  dPriorityInputs,
unsigned int  nTxSize = 0 
) const

Definition at line 191 of file transaction.cpp.

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

◆ GetHash()

const uint256& CTransaction::GetHash ( ) const
inline

Definition at line 342 of file transaction.h.

Here is the call graph for this function:

◆ GetOutPoints()

std::list< COutPoint > CTransaction::GetOutPoints ( ) const

Definition at line 182 of file transaction.cpp.

Here is the call graph for this function:

◆ GetValueOut()

CAmount CTransaction::GetValueOut ( ) const

Definition at line 155 of file transaction.cpp.

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

◆ IsCoinAudit()

bool CTransaction::IsCoinAudit ( ) const
inline

Definition at line 364 of file transaction.h.

Here is the caller graph for this function:

◆ IsCoinBase()

bool CTransaction::IsCoinBase ( ) const
inline

Definition at line 359 of file transaction.h.

Here is the caller graph for this function:

◆ IsCoinStake()

bool CTransaction::IsCoinStake ( ) const

Definition at line 143 of file transaction.cpp.

Here is the caller graph for this function:

◆ IsNull()

bool CTransaction::IsNull ( ) const
inline

Definition at line 338 of file transaction.h.

◆ operator=()

CTransaction & CTransaction::operator= ( const CTransaction tx)

Definition at line 124 of file transaction.cpp.

◆ SerializationOp()

template<typename Stream , typename Operation >
void CTransaction::SerializationOp ( Stream &  s,
Operation  ser_action,
int  nType,
int  nVersion 
)
inline

Definition at line 317 of file transaction.h.

Here is the call graph for this function:

◆ ToString()

std::string CTransaction::ToString ( ) const

Definition at line 217 of file transaction.cpp.

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

◆ UpdateHash()

void CTransaction::UpdateHash ( ) const
private

Definition at line 113 of file transaction.cpp.

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

◆ UsesUTXO()

bool CTransaction::UsesUTXO ( const COutPoint  out)

Definition at line 172 of file transaction.cpp.

Friends And Related Function Documentation

◆ operator!=

bool operator!= ( const CTransaction a,
const CTransaction b 
)
friend

Definition at line 376 of file transaction.h.

◆ operator==

bool operator== ( const CTransaction a,
const CTransaction b 
)
friend

Definition at line 371 of file transaction.h.

Member Data Documentation

◆ ADD_SERIALIZE_METHODS

CTransaction::ADD_SERIALIZE_METHODS

Definition at line 314 of file transaction.h.

◆ bulletproofs

std::vector<unsigned char> CTransaction::bulletproofs

Definition at line 296 of file transaction.h.

◆ c

uint256 CTransaction::c

Definition at line 300 of file transaction.h.

◆ CURRENT_VERSION

const int32_t CTransaction::CURRENT_VERSION =1
static

Definition at line 277 of file transaction.h.

◆ hash

const uint256 CTransaction::hash
private

Memory only.

Definition at line 273 of file transaction.h.

◆ hasPaymentID

char CTransaction::hasPaymentID

Definition at line 291 of file transaction.h.

◆ nLockTime

const uint32_t CTransaction::nLockTime

Definition at line 287 of file transaction.h.

◆ nTxFee

CAmount CTransaction::nTxFee

Definition at line 298 of file transaction.h.

◆ ntxFeeKeyImage

CKeyImage CTransaction::ntxFeeKeyImage

Definition at line 304 of file transaction.h.

◆ nVersion

const int32_t CTransaction::nVersion

Definition at line 284 of file transaction.h.

◆ paymentID

uint64_t CTransaction::paymentID

Definition at line 292 of file transaction.h.

◆ S

std::vector<std::vector<uint256> > CTransaction::S

Definition at line 301 of file transaction.h.

◆ txPrivM

CKey CTransaction::txPrivM

Definition at line 290 of file transaction.h.

◆ txType

uint32_t CTransaction::txType

Definition at line 294 of file transaction.h.

◆ vin

std::vector<CTxIn> CTransaction::vin

Definition at line 285 of file transaction.h.

◆ vout

std::vector<CTxOut> CTransaction::vout

Definition at line 286 of file transaction.h.


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