Bitcoin
Public Member Functions | Public Attributes | Static Private Attributes | List of all members
CMerkleTx Class Reference

#include <wallet.h>

Inheritance diagram for CMerkleTx:
CWalletTx

Public Member Functions

 CMerkleTx ()
 
 CMerkleTx (CTransactionRef arg)
 
void Init ()
 
void SetTx (CTransactionRef arg)
 
template<typename Stream , typename Operation >
void SerializationOp (Stream &s, Operation ser_action)
 
void SetMerkleBranch (const uint256 &block_hash, int posInBlock)
 
int GetDepthInMainChain (interfaces::Chain::Lock &locked_chain) const
 
bool IsInMainChain (interfaces::Chain::Lock &locked_chain) const
 
int GetBlocksToMaturity (interfaces::Chain::Lock &locked_chain) const
 
bool hashUnset () const
 
bool isAbandoned () const
 
void setAbandoned ()
 
const uint256GetHash () const
 
bool IsCoinBase () const
 
bool IsImmatureCoinBase (interfaces::Chain::Lock &locked_chain) const
 

Public Attributes

CTransactionRef tx
 
uint256 hashBlock
 
int nIndex
 
 ADD_SERIALIZE_METHODS
 

Static Private Attributes

static const uint256 ABANDON_HASH
 

Detailed Description

A transaction with a merkle branch linking it to the block chain.

Constructor & Destructor Documentation

◆ CMerkleTx() [1/2]

CMerkleTx::CMerkleTx ( )
inline

◆ CMerkleTx() [2/2]

CMerkleTx::CMerkleTx ( CTransactionRef  arg)
inlineexplicit

Member Function Documentation

◆ GetBlocksToMaturity()

int CMerkleTx::GetBlocksToMaturity ( interfaces::Chain::Lock locked_chain) const
Returns
number of blocks to maturity for this transaction: 0 : is not a coinbase transaction, or is a mature coinbase transaction >0 : is a coinbase transaction which matures in this many blocks

◆ GetDepthInMainChain()

int CMerkleTx::GetDepthInMainChain ( interfaces::Chain::Lock locked_chain) const

Return depth of transaction in blockchain: <0 : conflicts with a transaction this deep in the blockchain 0 : in memory pool, waiting to be included in a block >=1 : this many blocks deep in the main chain

◆ GetHash()

const uint256& CMerkleTx::GetHash ( ) const
inline

◆ hashUnset()

bool CMerkleTx::hashUnset ( ) const
inline

◆ Init()

void CMerkleTx::Init ( )
inline

◆ isAbandoned()

bool CMerkleTx::isAbandoned ( ) const
inline

◆ IsCoinBase()

bool CMerkleTx::IsCoinBase ( ) const
inline

◆ IsImmatureCoinBase()

bool CMerkleTx::IsImmatureCoinBase ( interfaces::Chain::Lock locked_chain) const

◆ IsInMainChain()

bool CMerkleTx::IsInMainChain ( interfaces::Chain::Lock locked_chain) const
inline

◆ SerializationOp()

template<typename Stream , typename Operation >
void CMerkleTx::SerializationOp ( Stream &  s,
Operation  ser_action 
)
inline

◆ setAbandoned()

void CMerkleTx::setAbandoned ( )
inline

◆ SetMerkleBranch()

void CMerkleTx::SetMerkleBranch ( const uint256 block_hash,
int  posInBlock 
)

◆ SetTx()

void CMerkleTx::SetTx ( CTransactionRef  arg)
inline

Member Data Documentation

◆ ABANDON_HASH

const uint256 CMerkleTx::ABANDON_HASH
staticprivate

Constant used in hashBlock to indicate tx has been abandoned

◆ ADD_SERIALIZE_METHODS

CMerkleTx::ADD_SERIALIZE_METHODS

◆ hashBlock

uint256 CMerkleTx::hashBlock

◆ nIndex

int CMerkleTx::nIndex

◆ tx

CTransactionRef CMerkleTx::tx

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