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

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

#include <wallet.h>

Inheritance diagram for CMerkleTx:
[legend]
Collaboration diagram for CMerkleTx:
[legend]

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 CBlockIndex *pIndex, int posInBlock)
 
int GetDepthInMainChain () const EXCLUSIVE_LOCKS_REQUIRED(cs_main)
 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. More...
 
bool IsInMainChain () const EXCLUSIVE_LOCKS_REQUIRED(cs_main)
 
int GetBlocksToMaturity () const EXCLUSIVE_LOCKS_REQUIRED(cs_main)
 
bool hashUnset () const
 
bool isAbandoned () const
 
void setAbandoned ()
 
const uint256GetHash () const
 
bool IsCoinBase () const
 
bool IsImmatureCoinBase () const EXCLUSIVE_LOCKS_REQUIRED(cs_main)
 

Public Attributes

CTransactionRef tx
 
uint256 hashBlock
 
int nIndex
 
 ADD_SERIALIZE_METHODS
 

Static Private Attributes

static const uint256 ABANDON_HASH
 Constant used in hashBlock to indicate tx has been abandoned. More...
 

Detailed Description

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

Definition at line 208 of file wallet.h.

Constructor & Destructor Documentation

◆ CMerkleTx() [1/2]

CMerkleTx::CMerkleTx ( )
inline

Definition at line 225 of file wallet.h.

◆ CMerkleTx() [2/2]

CMerkleTx::CMerkleTx ( CTransactionRef  arg)
inlineexplicit

Definition at line 231 of file wallet.h.

Member Function Documentation

◆ GetBlocksToMaturity()

int CMerkleTx::GetBlocksToMaturity ( ) 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

Definition at line 4259 of file wallet.cpp.

◆ GetDepthInMainChain()

int CMerkleTx::GetDepthInMainChain ( ) 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.

Definition at line 4244 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetHash()

const uint256& CMerkleTx::GetHash ( ) const
inline

Definition at line 280 of file wallet.h.

Here is the caller graph for this function:

◆ hashUnset()

bool CMerkleTx::hashUnset ( ) const
inline

Definition at line 276 of file wallet.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Init()

void CMerkleTx::Init ( )
inline

Definition at line 237 of file wallet.h.

◆ isAbandoned()

bool CMerkleTx::isAbandoned ( ) const
inline

Definition at line 277 of file wallet.h.

Here is the caller graph for this function:

◆ IsCoinBase()

bool CMerkleTx::IsCoinBase ( ) const
inline

Definition at line 281 of file wallet.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsImmatureCoinBase()

bool CMerkleTx::IsImmatureCoinBase ( ) const

Definition at line 4268 of file wallet.cpp.

Here is the caller graph for this function:

◆ IsInMainChain()

bool CMerkleTx::IsInMainChain ( ) const
inline

Definition at line 268 of file wallet.h.

◆ SerializationOp()

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

Definition at line 251 of file wallet.h.

◆ setAbandoned()

void CMerkleTx::setAbandoned ( )
inline

Definition at line 278 of file wallet.h.

◆ SetMerkleBranch()

void CMerkleTx::SetMerkleBranch ( const CBlockIndex pIndex,
int  posInBlock 
)

Definition at line 4235 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetTx()

void CMerkleTx::SetTx ( CTransactionRef  arg)
inline

Definition at line 243 of file wallet.h.

Here is the caller graph for this function:

Member Data Documentation

◆ ABANDON_HASH

const uint256 CMerkleTx::ABANDON_HASH
staticprivate

Constant used in hashBlock to indicate tx has been abandoned.

Definition at line 212 of file wallet.h.

◆ ADD_SERIALIZE_METHODS

CMerkleTx::ADD_SERIALIZE_METHODS

Definition at line 248 of file wallet.h.

◆ hashBlock

uint256 CMerkleTx::hashBlock

Definition at line 216 of file wallet.h.

◆ nIndex

int CMerkleTx::nIndex

Definition at line 223 of file wallet.h.

◆ tx

CTransactionRef CMerkleTx::tx

Definition at line 215 of file wallet.h.


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