![]() |
Master Core
v0.0.9 - 2abfd2849db8ba7a83957c64eb976b406713c123
|
pruned version of CTransaction: only retains metadata and unspent transaction outputs More...
#include <coins.h>
Public Member Functions | |
CCoins (const CTransaction &tx, int nHeightIn) | |
CCoins () | |
void | Cleanup () |
void | ClearUnspendable () |
void | swap (CCoins &to) |
void | CalcMaskSize (unsigned int &nBytes, unsigned int &nNonzeroBytes) const |
bool | IsCoinBase () const |
unsigned int | GetSerializeSize (int nType, int nVersion) const |
template<typename Stream > | |
void | Serialize (Stream &s, int nType, int nVersion) const |
template<typename Stream > | |
void | Unserialize (Stream &s, int nType, int nVersion) |
bool | Spend (const COutPoint &out, CTxInUndo &undo) |
bool | Spend (int nPos) |
bool | IsAvailable (unsigned int nPos) const |
bool | IsPruned () const |
Public Attributes | |
bool | fCoinBase |
std::vector< CTxOut > | vout |
int | nHeight |
int | nVersion |
Friends | |
bool | operator== (const CCoins &a, const CCoins &b) |
bool | operator!= (const CCoins &a, const CCoins &b) |
pruned version of CTransaction: only retains metadata and unspent transaction outputs
Serialized format:
The nCode value consists of:
Example: 0104835800816115944e077fe7c803cfa57f29b36bf87c1d358bb85e <><><-----------------------------------------—><-—> | \ | / version code vout[1] height
Example: 0109044086ef97d5790061b01caab50f1b8e9c50a5057eb43c2d9563a4eebbd123008c988f1a4a4de2161e0f50aac7f17e7f9555caa486af3b <><><–><-----------------------------------------------—><-------------------------------------------—><-—> / \ \ | | / version code unspentness vout[4] vout[16] height
|
inline |
Definition at line 85 of file coins.h.
References ClearUnspendable().
Definition at line 12 of file coins.cpp.
References vout.
Referenced by GetSerializeSize(), and Serialize().
|
inline |
Definition at line 93 of file coins.h.
Referenced by ClearUnspendable(), Spend(), and Unserialize().
|
inline |
Definition at line 100 of file coins.h.
References Cleanup(), CScript::IsUnspendable(), and CTxOut::scriptPubKey.
Referenced by CCoins(), and DisconnectBlock().
|
inline |
Definition at line 228 of file coins.h.
Referenced by CTxMemPool::check(), DisconnectBlock(), CCoinsViewCache::GetOutputFor(), CCoinsViewCache::GetPriority(), CCoinsViewCache::HaveInputs(), and signrawtransaction().
|
inline |
Definition at line 131 of file coins.h.
References fCoinBase.
Referenced by CheckInputs().
|
inline |
Definition at line 234 of file coins.h.
References CTxOut::IsNull().
Referenced by BatchWriteCoins(), and DisconnectBlock().
Definition at line 30 of file coins.cpp.
References Cleanup(), fCoinBase, CTxInUndo::fCoinBase, COutPoint::n, nHeight, CTxInUndo::nHeight, nVersion, CTxInUndo::nVersion, and vout.
Referenced by CTxMemPool::pruneSpent(), Spend(), and UpdateCoins().
bool CCoins::Spend | ( | int | nPos | ) |
|
inline |
bool CCoins::fCoinBase |
Definition at line 72 of file coins.h.
Referenced by DisconnectBlock(), gettxout(), IsCoinBase(), Spend(), and swap().
int CCoins::nHeight |
Definition at line 78 of file coins.h.
Referenced by CheckInputs(), CreateNewBlock(), DisconnectBlock(), CCoinsViewCache::GetPriority(), GetTransaction(), gettxout(), sendrawtransaction(), Spend(), and swap().
int CCoins::nVersion |
Definition at line 82 of file coins.h.
Referenced by DisconnectBlock(), GetSerializeSize(), gettxout(), Serialize(), Spend(), and swap().
std::vector<CTxOut> CCoins::vout |
Definition at line 75 of file coins.h.
Referenced by CalcMaskSize(), CheckInputs(), CreateNewBlock(), DisconnectBlock(), CCoinsViewCache::GetOutputFor(), CCoinsViewCache::GetPriority(), gettxout(), signrawtransaction(), Spend(), swap(), and TransactionDesc::toHTML().