![]() |
Dash Core
0.12.2.1
P2P Digital Currency
|
#include <transaction.h>
Public Member Functions | |
CTransaction () | |
CTransaction (const CMutableTransaction &tx) | |
CTransaction & | operator= (const CTransaction &tx) |
template<typename Stream , typename Operation > | |
void | SerializationOp (Stream &s, Operation ser_action, int nType, int nVersion) |
bool | IsNull () const |
const uint256 & | GetHash () const |
CAmount | GetValueOut () const |
double | ComputePriority (double dPriorityInputs, unsigned int nTxSize=0) const |
unsigned int | CalculateModifiedSize (unsigned int nTxSize=0) const |
unsigned int | GetTotalSize () const |
bool | IsCoinBase () const |
std::string | ToString () const |
Public Attributes | |
const int32_t | nVersion |
const std::vector< CTxIn > | vin |
const std::vector< CTxOut > | vout |
const uint32_t | nLockTime |
ADD_SERIALIZE_METHODS | |
Static Public Attributes | |
static const int32_t | CURRENT_VERSION =1 |
static const int32_t | MAX_STANDARD_VERSION =2 |
Private Member Functions | |
void | UpdateHash () const |
Private Attributes | |
const uint256 | hash |
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.
Definition at line 210 of file transaction.h.
CTransaction::CTransaction | ( | ) |
Construct a CTransaction that qualifies as IsNull()
Definition at line 97 of file transaction.cpp.
CTransaction::CTransaction | ( | const CMutableTransaction & | tx | ) |
Convert a CMutableTransaction into a CTransaction.
Definition at line 99 of file transaction.cpp.
unsigned int CTransaction::CalculateModifiedSize | ( | unsigned int | nTxSize = 0 | ) | const |
Definition at line 132 of file transaction.cpp.
Referenced by ComputePriority(), and CTxMemPoolEntry::CTxMemPoolEntry().
double CTransaction::ComputePriority | ( | double | dPriorityInputs, |
unsigned int | nTxSize = 0 |
||
) | const |
Definition at line 124 of file transaction.cpp.
Referenced by CWallet::CreateTransaction(), and CCoinsViewCache::GetPriority().
|
inline |
Definition at line 262 of file transaction.h.
Referenced by CInstantSend::AcceptLockRequest(), AcceptToMemoryPool(), AcceptToMemoryPoolWorker(), CTxMemPool::addAddressIndex(), CPrivateSend::AddDSTX(), CTxMemPool::addSpentIndex(), CWallet::AddToWallet(), CWallet::AddToWalletIfInvolvingMe(), AppInit2(), blockToJSON(), CheckBlock(), CDarksendBroadcastTx::CheckSignature(), CPrivateSendServer::CommitFinalTransaction(), CWallet::CommitTransaction(), ConnectBlock(), CPrivateSendClient::CreateDenominated(), CreateNewBlock(), CInstantSend::CreateTxLockCandidate(), TransactionRecord::decomposeTransaction(), DisconnectBlock(), DisconnectTip(), TransactionDesc::FormatTxStatus(), getblocktemplate(), CTxLockCandidate::GetHash(), GetTransaction(), gettxoutproof(), gobject(), CInstantSend::IsEnoughOrphanVotesForTx(), IsRBFOptIn(), CBloomFilter::IsRelevantAndUpdate(), CTxLockRequest::IsValid(), ListReceived(), CPrivateSendClient::MakeCollateralAmounts(), mempoolToJSON(), CZMQPublishHashTransactionNotifier::NotifyTransaction(), CZMQPublishRawTransactionNotifier::NotifyTransaction(), CZMQPublishHashTransactionLockNotifier::NotifyTransactionLock(), CZMQPublishRawTransactionLockNotifier::NotifyTransactionLock(), mempoolentry_txid::operator()(), CompareTxMemPoolEntryByScore::operator()(), OutputTxHash(), ProcessMessage(), CBlockPolicyEstimator::processTransaction(), CInstantSend::ProcessTxLockRequest(), CWallet::ReacceptWalletTransactions(), CInstantSend::RejectLockRequest(), CConnman::RelayTransaction(), CTxMemPool::remove(), CTxMemPool::removeConflicts(), CTxMemPool::removeForBlock(), CWalletDB::ReorderTransactions(), CWallet::ResendWalletTransactionsBefore(), sendfrom(), sendmany(), sendrawtransaction(), CDarksendBroadcastTx::Sign(), CPrivateSendClient::SignFinalTransaction(), CInstantSend::SyncTransaction(), CPrivateSend::SyncTransaction(), TransactionDesc::toHTML(), ToString(), CInstantSend::TryToFinalizeLockCandidate(), TxToJSON(), TxToUniv(), UpdateCoins(), and WalletTxToJSON().
unsigned int CTransaction::GetTotalSize | ( | ) | const |
Get the total transaction size in bytes, including witness data. "Total Size" defined in BIP141 and BIP144.
Definition at line 150 of file transaction.cpp.
Referenced by TransactionDesc::toHTML().
CAmount CTransaction::GetValueOut | ( | ) | const |
Definition at line 112 of file transaction.cpp.
Referenced by AcceptToMemoryPoolWorker(), Consensus::CheckTxInputs(), ConnectBlock(), CTxMemPoolEntry::CTxMemPoolEntry(), TransactionRecord::decomposeTransaction(), gettransaction(), CMasternodeBlockPayees::IsTransactionValid(), CSuperblock::IsValid(), WalletModel::prepareTransaction(), and TransactionDesc::toHTML().
|
inline |
Definition at line 284 of file transaction.h.
Referenced by AcceptToMemoryPoolWorker(), AreInputsStandard(), CWallet::AvailableCoins(), CheckBlock(), CheckInputs(), CheckTransaction(), ConnectBlock(), TransactionRecord::decomposeTransaction(), DisconnectTip(), CCoins::FromTx(), CWallet::GetAddressBalances(), getblocktemplate(), GetP2SHSigOpCount(), CCoinsViewCache::GetPriority(), getreceivedbyaccount(), getreceivedbyaddress(), CCoinsViewCache::GetValueIn(), CCoinsViewCache::HaveInputs(), ListReceived(), ListTransactions(), CWallet::ReacceptWalletTransactions(), CWallet::SelectCoinsGrouppedByAddresses(), TransactionRecord::showTransaction(), CInstantSend::SyncTransaction(), CPrivateSend::SyncTransaction(), TransactionDesc::toHTML(), TxToJSON(), TxToUniv(), UpdateCoins(), TransactionRecord::updateStatus(), and WalletTxToJSON().
|
inline |
Definition at line 258 of file transaction.h.
CTransaction & CTransaction::operator= | ( | const CTransaction & | tx | ) |
Definition at line 103 of file transaction.cpp.
|
inline |
Definition at line 248 of file transaction.h.
std::string CTransaction::ToString | ( | ) | const |
Definition at line 155 of file transaction.cpp.
Referenced by CPrivateSendServer::ChargeRandomFees(), CPrivateSendServer::CommitFinalTransaction(), CWallet::CommitTransaction(), IsBlockPayeeValid(), CGovernanceObject::IsCollateralValid(), CPrivateSend::IsCollateralValid(), CTxLockRequest::IsValid(), and TransactionDesc::toHTML().
|
private |
Definition at line 92 of file transaction.cpp.
Referenced by CTransaction(), and SerializationOp().
|
friend |
Definition at line 294 of file transaction.h.
|
friend |
Definition at line 289 of file transaction.h.
CTransaction::ADD_SERIALIZE_METHODS |
Definition at line 245 of file transaction.h.
|
static |
Definition at line 219 of file transaction.h.
Referenced by AddOrphanTx(), IsStandardTx(), and MutateTxVersion().
|
private |
Memory only.
Definition at line 214 of file transaction.h.
Referenced by GetHash(), operator=(), and UpdateHash().
|
static |
Definition at line 225 of file transaction.h.
Referenced by IsStandardTx().
const uint32_t CTransaction::nLockTime |
Definition at line 235 of file transaction.h.
Referenced by TransactionSignatureChecker::CheckLockTime(), TransactionDesc::FormatTxStatus(), CPrivateSend::IsCollateralValid(), IsFinalTx(), operator=(), SerializationOp(), ToString(), TxToJSON(), TxToUniv(), and TransactionRecord::updateStatus().
const int32_t CTransaction::nVersion |
Definition at line 232 of file transaction.h.
Referenced by AcceptToMemoryPoolWorker(), CalculateSequenceLocks(), TransactionSignatureChecker::CheckSequence(), CCoins::FromTx(), IsStandardTx(), operator=(), CMerkleTx::SerializationOp(), SerializationOp(), ToString(), TxToJSON(), and TxToUniv().
const std::vector<CTxIn> CTransaction::vin |
Definition at line 233 of file transaction.h.
Referenced by AcceptToMemoryPoolWorker(), CTxMemPool::addAddressIndex(), CTxMemPool::addSpentIndex(), CWallet::AddToWallet(), CWallet::AddToWalletIfInvolvingMe(), CTxMemPool::addUnchecked(), AreInputsStandard(), CTxMemPool::CalculateMemPoolAncestors(), CalculateModifiedSize(), CalculateSequenceLocks(), CTxMemPool::check(), CheckBlock(), CheckInputs(), TransactionSignatureChecker::CheckLockTime(), TransactionSignatureChecker::CheckSequence(), CheckSequenceLocks(), CheckTransaction(), Consensus::CheckTxInputs(), CWallet::CommitTransaction(), ConnectBlock(), CInstantSend::CreateTxLockCandidate(), TransactionRecord::decomposeTransaction(), DisconnectBlock(), CWallet::FundTransaction(), CWallet::GetAddressGroupings(), getblocktemplate(), CWallet::GetConflicts(), CWallet::GetDebit(), GetLegacySigOpCount(), CTxLockRequest::GetMaxSignatures(), CTxLockRequest::GetMinFee(), GetP2SHSigOpCount(), CCoinsViewCache::GetPriority(), CWallet::GetRealOutpointPrivateSendRounds(), CCoinsViewCache::GetValueIn(), CTxMemPool::HasNoInputsOf(), CCoinsViewCache::HaveInputs(), IsCoinBase(), CPrivateSend::IsCollateralValid(), CInstantSend::IsEnoughOrphanVotesForTx(), IsFinalTx(), IsNull(), CBloomFilter::IsRelevantAndUpdate(), IsStandardTx(), CTxLockRequest::IsValid(), WalletModel::listCoins(), mempoolToJSON(), MutateTxSign(), operator=(), WalletModel::prepareTransaction(), CInstantSend::ProcessTxLockRequest(), RecursiveDynamicUsage(), CTxMemPool::removeConflicts(), CTxMemPool::removeForReorg(), CInstantSend::ResolveConflicts(), SerializationOp(), SignalsOptInRBF(), SignatureHash(), CWallet::SyncTransaction(), TransactionDesc::toHTML(), ToString(), CTxMemPool::TrimToSize(), TxToJSON(), TxToUniv(), and UpdateCoins().
const std::vector<CTxOut> CTransaction::vout |
Definition at line 234 of file transaction.h.
Referenced by CTxMemPool::addAddressIndex(), CWallet::AddToWallet(), CWallet::AvailableCoins(), CTxMemPool::check(), CheckTransaction(), ConnectBlock(), CWallet::ConvertList(), CWallet::CountInputsWithAmount(), TransactionRecord::decomposeTransaction(), DisconnectBlock(), CCoins::FromTx(), fundrawtransaction(), CWallet::FundTransaction(), GetAccountAddress(), CWallet::GetAddressBalances(), CWallet::GetAddressGroupings(), CWallet::GetChange(), CWallet::GetCredit(), CWallet::GetDebit(), CWallet::GetKeyBirthTimes(), GetLegacySigOpCount(), CWallet::GetRealOutpointPrivateSendRounds(), getreceivedbyaccount(), getreceivedbyaddress(), GetValueOut(), CGovernanceObject::IsCollateralValid(), CPrivateSend::IsCollateralValid(), CWallet::IsDenominated(), CWallet::IsMine(), IsNull(), CBloomFilter::IsRelevantAndUpdate(), IsStandardTx(), CMasternodeBlockPayees::IsTransactionValid(), CWalletTx::IsTrusted(), CTxLockRequest::IsValid(), CSuperblock::IsValid(), less_then_denom(), WalletModel::listCoins(), ListReceived(), operator=(), WalletModelTransaction::reassignAmounts(), RecursiveDynamicUsage(), CTxMemPool::remove(), CWallet::SelectCoins(), CWallet::SelectCoinsGrouppedByAddresses(), CWallet::SelectCoinsMinConf(), SerializationOp(), SignatureHash(), SignSignature(), TransactionDesc::toHTML(), ToString(), TxToJSON(), and TxToUniv().