Bitcoin Core  0.15.99
P2P Digital Currency
Public Member Functions | Public Attributes | List of all members
Coin Class Reference

A UTXO entry. More...

#include <coins.h>

Collaboration diagram for Coin:
[legend]

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::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::Coin ( const CTxOut outIn,
int  nHeightIn,
bool  fCoinBaseIn 
)
inline

Definition at line 43 of file coins.h.

Coin::Coin ( )
inline

empty constructor

Definition at line 52 of file coins.h.

Member Function Documentation

void Coin::Clear ( )
inline

Definition at line 45 of file coins.h.

Here is the call graph for this function:

size_t Coin::DynamicMemoryUsage ( ) const
inline

Definition at line 79 of file coins.h.

Here is the caller graph for this function:

bool Coin::IsCoinBase ( ) const
inline

Definition at line 54 of file coins.h.

Here is the caller graph for this function:

bool Coin::IsSpent ( ) const
inline

Definition at line 75 of file coins.h.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 59 of file coins.h.

Here is the call graph for this function:

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

Definition at line 67 of file coins.h.

Here is the call graph for this function:

Member Data Documentation

unsigned int Coin::fCoinBase

whether containing transaction was a coinbase

Definition at line 36 of file coins.h.

uint32_t Coin::nHeight

at which height this containing transaction was included in the active block chain

Definition at line 39 of file coins.h.

CTxOut Coin::out

unspent transaction output

Definition at line 33 of file coins.h.


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