Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

A UTXO entry. More...

#include <coins.h>

+ Collaboration diagram for Coin:

Public Member Functions

 Coin (CTxOut &&outIn, int nHeightIn, bool fCoinBaseIn)
 construct a Coin from a CTxOut and height/coinbase information. More...
 
 Coin (const CTxOut &outIn, int nHeightIn, bool fCoinBaseIn)
 
void Clear ()
 
 Coin ()
 empty constructor More...
 
bool IsCoinBase () const
 
template<typename Stream >
void Serialize (Stream &s) const
 
template<typename Stream >
void Unserialize (Stream &s)
 
bool IsSpent () const
 
size_t DynamicMemoryUsage () const
 

Public Attributes

CTxOut out
 unspent transaction output More...
 
unsigned int fCoinBase: 1
 whether containing transaction was a coinbase More...
 
uint32_t nHeight: 31
 at which height this containing transaction was included in the active block chain More...
 

Detailed Description

A UTXO entry.

Serialized format:

Definition at line 29 of file coins.h.

Constructor & Destructor Documentation

◆ Coin() [1/3]

Coin::Coin ( CTxOut &&  outIn,
int  nHeightIn,
bool  fCoinBaseIn 
)
inline

construct a Coin from a CTxOut and height/coinbase information.

Definition at line 42 of file coins.h.

◆ Coin() [2/3]

Coin::Coin ( const CTxOut outIn,
int  nHeightIn,
bool  fCoinBaseIn 
)
inline

Definition at line 43 of file coins.h.

◆ Coin() [3/3]

Coin::Coin ( )
inline

empty constructor

Definition at line 52 of file coins.h.

Member Function Documentation

◆ Clear()

void Coin::Clear ( )
inline

Definition at line 45 of file coins.h.

References fCoinBase, nHeight, out, and CTxOut::SetNull().

◆ DynamicMemoryUsage()

size_t Coin::DynamicMemoryUsage ( ) const
inline

Definition at line 79 of file coins.h.

References memusage::DynamicUsage(), out, and CTxOut::scriptPubKey.

Referenced by CCoinsViewCache::BatchWrite().

◆ IsCoinBase()

bool Coin::IsCoinBase ( ) const
inline

Definition at line 54 of file coins.h.

References fCoinBase.

Referenced by AcceptToMemoryPoolWorker(), Consensus::CheckTxInputs(), and CTxMemPool::removeForReorg().

◆ IsSpent()

◆ Serialize()

template<typename Stream >
void Coin::Serialize ( Stream &  s) const
inline

Definition at line 59 of file coins.h.

References fCoinBase, IsSpent(), nHeight, out, REF(), and VARINT.

◆ Unserialize()

template<typename Stream >
void Coin::Unserialize ( Stream &  s)
inline

Definition at line 67 of file coins.h.

References fCoinBase, nHeight, out, REF(), and VARINT.

Member Data Documentation

◆ fCoinBase

unsigned int Coin::fCoinBase

◆ nHeight

◆ out


The documentation for this class was generated from the following file:
Released under the MIT license