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 (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. More...
 
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
 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 232 of file wallet.h.

Constructor & Destructor Documentation

◆ CMerkleTx() [1/2]

CMerkleTx::CMerkleTx ( )
inline

Definition at line 249 of file wallet.h.

◆ CMerkleTx() [2/2]

CMerkleTx::CMerkleTx ( CTransactionRef  arg)
inlineexplicit

Definition at line 255 of file wallet.h.

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

Definition at line 4293 of file wallet.cpp.

◆ 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.

Definition at line 4278 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 304 of file wallet.h.

Here is the caller graph for this function:

◆ hashUnset()

bool CMerkleTx::hashUnset ( ) const
inline

Definition at line 300 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 261 of file wallet.h.

◆ isAbandoned()

bool CMerkleTx::isAbandoned ( ) const
inline

Definition at line 301 of file wallet.h.

Here is the caller graph for this function:

◆ IsCoinBase()

bool CMerkleTx::IsCoinBase ( ) const
inline

Definition at line 305 of file wallet.h.

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

◆ IsImmatureCoinBase()

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

Definition at line 4302 of file wallet.cpp.

Here is the caller graph for this function:

◆ IsInMainChain()

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

Definition at line 292 of file wallet.h.

◆ SerializationOp()

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

Definition at line 275 of file wallet.h.

◆ setAbandoned()

void CMerkleTx::setAbandoned ( )
inline

Definition at line 302 of file wallet.h.

◆ SetMerkleBranch()

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

Definition at line 4269 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 267 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 236 of file wallet.h.

◆ ADD_SERIALIZE_METHODS

CMerkleTx::ADD_SERIALIZE_METHODS

Definition at line 272 of file wallet.h.

◆ hashBlock

uint256 CMerkleTx::hashBlock

Definition at line 240 of file wallet.h.

◆ nIndex

int CMerkleTx::nIndex

Definition at line 247 of file wallet.h.

◆ tx

CTransactionRef CMerkleTx::tx

Definition at line 239 of file wallet.h.


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