Master Core
v0.0.9 - 2abfd2849db8ba7a83957c64eb976b406713c123
|
The basic transaction that is broadcasted on the network and contained in blocks. More...
#include <core.h>
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< CTxIn > | vin |
std::vector< CTxOut > | vout |
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) |
The basic transaction that is broadcasted on the network and contained in blocks.
A transaction can contain multiple inputs and outputs.
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().
uint256 CTransaction::GetHash | ( | ) | const |
Definition at line 75 of file core.cpp.
References SerializeHash().
Referenced by AcceptToMemoryPool(), AddOrphanTx(), CWallet::AddToWallet(), blockToJSON(), CBlock::BuildMerkleTree(), CheckInputs(), mastercore::ClassB_send(), CWallet::CommitTransaction(), ConnectTip(), CreateNewBlock(), TransactionRecord::decomposeTransaction(), DisconnectBlock(), DisconnectTip(), getblocktemplate(), GetTransaction(), listblocktransactions_MP(), ListReceived(), listtransactions_MP(), mastercore_handler_tx(), parseTransaction(), COrphan::print(), CWallet::ReacceptWalletTransactions(), CTxMemPool::remove(), CWalletDB::ReorderTransactions(), CWallet::ScanForWalletTransactions(), sendfrom(), sendmany(), sendrawtransaction(), sendtoaddress(), TransactionDesc::toHTML(), ToString(), COutput::ToString(), TXExodusFundraiser(), TxToJSON(), CoinControlDialog::updateLabels(), CoinControlDialog::updateView(), and WalletTxToJSON().
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().
|
inline |
Definition at line 232 of file core.h.
Referenced by AcceptToMemoryPool(), AreInputsStandard(), CWallet::AvailableCoins(), CheckInputs(), CheckTransaction(), ConnectBlock(), CreateNewBlock(), TransactionRecord::decomposeTransaction(), DisconnectTip(), CWallet::GetAddressBalances(), getblocktemplate(), GetP2SHSigOpCount(), CCoinsViewCache::GetPriority(), getreceivedbyaccount(), getreceivedbyaddress(), CCoinsViewCache::GetValueIn(), CCoinsViewCache::HaveInputs(), ListReceived(), ListTransactions(), CWallet::ReacceptWalletTransactions(), TransactionRecord::showTransaction(), TransactionDesc::toHTML(), TxToJSON(), UpdateCoins(), TransactionRecord::updateStatus(), and WalletTxToJSON().
bool CTransaction::IsNewerThan | ( | const CTransaction & | old | ) | const |
void CTransaction::print | ( | ) | const |
Definition at line 156 of file core.cpp.
References LogPrintf, and ToString().
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().
|
friend |
|
friend |
|
static |
Definition at line 188 of file core.h.
Referenced by AddOrphanTx(), and IsStandardTx().
unsigned int CTransaction::nLockTime |
Definition at line 192 of file core.h.
Referenced by TransactionDesc::FormatTxStatus(), IsFinalTx(), ToString(), TxToJSON(), and TransactionRecord::updateStatus().
|
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().
|
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 |
Definition at line 190 of file core.h.
Referenced by AcceptToMemoryPool(), AddOrphanTx(), CTxMemPool::addUnchecked(), AreInputsStandard(), CTxMemPool::check(), CheckInputs(), CheckTransaction(), CMainParams::CMainParams(), CWallet::CommitTransaction(), ComputePriority(), ConnectBlock(), CreateNewBlock(), createrawtransaction(), TransactionRecord::decomposeTransaction(), DisconnectBlock(), CWallet::GetAddressGroupings(), CWallet::GetConflicts(), CWallet::GetDebit(), GetLegacySigOpCount(), GetP2SHSigOpCount(), CCoinsViewCache::GetPriority(), getrawmempool(), CCoinsViewCache::GetValueIn(), CCoinsViewCache::HaveInputs(), IsFinalTx(), IsNewerThan(), CBloomFilter::IsRelevantAndUpdate(), IsStandardTx(), WalletModel::listCoins(), parseTransaction(), CTxMemPool::remove(), CTxMemPool::removeConflicts(), SignatureHash(), signrawtransaction(), SignSignature(), CWallet::SyncTransaction(), TransactionDesc::toHTML(), ToString(), TxToJSON(), and UpdateCoins().
std::vector<CTxOut> CTransaction::vout |
Definition at line 191 of file core.h.
Referenced by CWallet::AvailableCoins(), CTxMemPool::check(), CheckTransaction(), CMainParams::CMainParams(), CreateNewBlock(), createrawtransaction(), TransactionRecord::decomposeTransaction(), GetAccountAddress(), CWallet::GetAddressBalances(), CWallet::GetAddressGroupings(), WalletModel::getBalance(), CWallet::GetChange(), CWallet::GetCredit(), CWallet::GetDebit(), CWallet::GetKeyBirthTimes(), GetLegacySigOpCount(), GetMinFee(), getreceivedbyaccount(), getreceivedbyaddress(), GetValueOut(), CWallet::IsMine(), CBloomFilter::IsRelevantAndUpdate(), IsStandardTx(), CWalletTx::IsTrusted(), WalletModel::listCoins(), ListReceived(), parseTransaction(), populateRPCTransactionObject(), CTxMemPool::remove(), CWallet::SelectCoins(), selectCoins(), CWallet::SelectCoinsMinConf(), SignatureHash(), signrawtransaction(), SignSignature(), TransactionDesc::toHTML(), ToString(), COutput::ToString(), TxToJSON(), CoinControlDialog::updateLabels(), and CoinControlDialog::updateView().