Master Core  v0.0.9 - 2abfd2849db8ba7a83957c64eb976b406713c123
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Member Functions | Public Attributes | Static Public Attributes | Friends | List of all members
CTransaction Class Reference

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

#include <core.h>

+ Inheritance diagram for CTransaction:
+ Collaboration diagram for CTransaction:

Public Member Functions

 CTransaction ()
 
 IMPLEMENT_SERIALIZE (READWRITE(this->nVersion);nVersion=this->nVersion;READWRITE(vin);READWRITE(vout);READWRITE(nLockTime);) void SetNull()
 
bool IsNull () const
 
uint256 GetHash () const
 
bool IsNewerThan (const CTransaction &old) const
 
int64_t GetValueOut () const
 
double ComputePriority (double dPriorityInputs, unsigned int nTxSize=0) const
 
bool IsCoinBase () const
 
std::string ToString () const
 
void print () const
 

Public Attributes

int nVersion
 
std::vector< CTxInvin
 
std::vector< CTxOutvout
 
unsigned int nLockTime
 

Static Public Attributes

static int64_t nMinTxFee = 10000
 Fees smaller than this (in satoshi) are considered zero fee (for transaction creation) More...
 
static int64_t nMinRelayTxFee = 1000
 Fees smaller than this (in satoshi) are considered zero fee (for relaying and mining) More...
 
static const int CURRENT_VERSION =1
 

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 183 of file core.h.

Constructor & Destructor Documentation

CTransaction::CTransaction ( )
inline

Definition at line 194 of file core.h.

Member Function Documentation

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

Definition at line 121 of file core.cpp.

References GetSerializeSize(), PROTOCOL_VERSION, CTxIn::scriptSig, SER_NETWORK, and vin.

Referenced by CreateNewBlock(), and CCoinsViewCache::GetPriority().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint256 CTransaction::GetHash ( ) const
int64_t CTransaction::GetValueOut ( ) const

Definition at line 109 of file core.cpp.

References MoneyRange(), CTxOut::nValue, and vout.

Referenced by AcceptToMemoryPool(), CheckInputs(), ConnectBlock(), CreateNewBlock(), TransactionRecord::decomposeTransaction(), CTxMemPoolEntry::GetPriority(), gettransaction(), and TransactionDesc::toHTML().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

CTransaction::IMPLEMENT_SERIALIZE ( READWRITE(this->nVersion);  nVersion = this->nVersionREADWRITE(vin); READWRITE(vout); READWRITE(nLockTime);)
inline

Definition at line 200 of file core.h.

bool CTransaction::IsCoinBase ( ) const
inline
bool CTransaction::IsNewerThan ( const CTransaction old) const

Definition at line 80 of file core.cpp.

References vin.

bool CTransaction::IsNull ( ) const
inline

Definition at line 216 of file core.h.

void CTransaction::print ( ) const

Definition at line 156 of file core.cpp.

References LogPrintf, and ToString().

+ Here is the call graph for this function:

std::string CTransaction::ToString ( ) const

Definition at line 140 of file core.cpp.

References GetHash(), nLockTime, nVersion, strprintf, vin, and vout.

Referenced by mastercore::ClassB_send(), CWallet::CommitTransaction(), print(), and TransactionDesc::toHTML().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Friends And Related Function Documentation

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

Definition at line 245 of file core.h.

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

Definition at line 237 of file core.h.

Member Data Documentation

const int CTransaction::CURRENT_VERSION =1
static

Definition at line 188 of file core.h.

Referenced by AddOrphanTx(), and IsStandardTx().

unsigned int CTransaction::nLockTime
int64_t CTransaction::nMinRelayTxFee = 1000
static

Fees smaller than this (in satoshi) are considered zero fee (for relaying and mining)

Definition at line 187 of file core.h.

Referenced by AcceptToMemoryPool(), AppInit2(), CreateNewBlock(), GetDustLimit(), getinfo(), GetMinFee(), getnetworkinfo(), HelpMessage(), GUIUtil::isDust(), IsStandardTx(), PaymentServer::processPaymentRequest(), and CoinControlDialog::updateLabels().

int64_t CTransaction::nMinTxFee = 10000
static

Fees smaller than this (in satoshi) are considered zero fee (for transaction creation)

Definition at line 186 of file core.h.

Referenced by AppInit2(), GetMinFee(), HelpMessage(), OptionsDialog::OptionsDialog(), and CoinControlDialog::updateLabels().

int CTransaction::nVersion

Definition at line 189 of file core.h.

Referenced by IsStandardTx(), ToString(), and TxToJSON().

std::vector<CTxIn> CTransaction::vin
std::vector<CTxOut> CTransaction::vout

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