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)
 
 operator const CTransaction & () const
 Helper conversion operator to allow passing CMerkleTx where CTransaction is expected. More...
 
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 CBlockIndex *&pindexRet) 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...
 
int GetDepthInMainChain () const
 
bool IsInMainChain () const
 
int GetBlocksToMaturity () const
 
bool AcceptToMemoryPool (const CAmount &nAbsurdFee, CValidationState &state)
 Pass this transaction to the mempool. More...
 
bool hashUnset () const
 
bool isAbandoned () const
 
void setAbandoned ()
 
const uint256GetHash () const
 
bool IsCoinBase () 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 188 of file wallet.h.

Constructor & Destructor Documentation

CMerkleTx::CMerkleTx ( )
inline

Definition at line 205 of file wallet.h.

CMerkleTx::CMerkleTx ( CTransactionRef  arg)
inlineexplicit

Definition at line 211 of file wallet.h.

Member Function Documentation

bool CMerkleTx::AcceptToMemoryPool ( const CAmount nAbsurdFee,
CValidationState state 
)

Pass this transaction to the mempool.

Fails if absolute fee exceeds absurd fee.

Definition at line 4020 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int CMerkleTx::GetBlocksToMaturity ( ) const

Definition at line 4012 of file wallet.cpp.

Here is the caller graph for this function:

int CMerkleTx::GetDepthInMainChain ( const CBlockIndex *&  pindexRet) 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 3993 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int CMerkleTx::GetDepthInMainChain ( ) const
inline

Definition at line 252 of file wallet.h.

Here is the call graph for this function:

Here is the caller graph for this function:

const uint256& CMerkleTx::GetHash ( ) const
inline

Definition at line 261 of file wallet.h.

Here is the caller graph for this function:

bool CMerkleTx::hashUnset ( ) const
inline

Definition at line 257 of file wallet.h.

Here is the call graph for this function:

Here is the caller graph for this function:

void CMerkleTx::Init ( )
inline

Definition at line 221 of file wallet.h.

bool CMerkleTx::isAbandoned ( ) const
inline

Definition at line 258 of file wallet.h.

Here is the caller graph for this function:

bool CMerkleTx::IsCoinBase ( ) const
inline

Definition at line 262 of file wallet.h.

Here is the caller graph for this function:

bool CMerkleTx::IsInMainChain ( ) const
inline

Definition at line 253 of file wallet.h.

Here is the call graph for this function:

Here is the caller graph for this function:

CMerkleTx::operator const CTransaction & ( ) const
inline

Helper conversion operator to allow passing CMerkleTx where CTransaction is expected.

TODO: adapt callers and remove this operator.

Definition at line 219 of file wallet.h.

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

Definition at line 235 of file wallet.h.

void CMerkleTx::setAbandoned ( )
inline

Definition at line 259 of file wallet.h.

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

Definition at line 3984 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void CMerkleTx::SetTx ( CTransactionRef  arg)
inline

Definition at line 227 of file wallet.h.

Here is the caller graph for this function:

Member Data Documentation

const uint256 CMerkleTx::ABANDON_HASH
staticprivate

Constant used in hashBlock to indicate tx has been abandoned.

Definition at line 192 of file wallet.h.

CMerkleTx::ADD_SERIALIZE_METHODS

Definition at line 232 of file wallet.h.

uint256 CMerkleTx::hashBlock

Definition at line 196 of file wallet.h.

int CMerkleTx::nIndex

Definition at line 203 of file wallet.h.

CTransactionRef CMerkleTx::tx

Definition at line 195 of file wallet.h.


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