Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.h
Show First 20 Lines • Show All 228 Lines • ▼ Show 20 Lines | public: | ||||
void SetMerkleBranch(const CBlockIndex *pIndex, int posInBlock); | void SetMerkleBranch(const CBlockIndex *pIndex, int posInBlock); | ||||
/** | /** | ||||
* Return depth of transaction in blockchain: | * Return depth of transaction in blockchain: | ||||
* <0 : conflicts with a transaction this deep in the blockchain | * <0 : conflicts with a transaction this deep in the blockchain | ||||
* 0 : in memory pool, waiting to be included in a block | * 0 : in memory pool, waiting to be included in a block | ||||
* >=1 : this many blocks deep in the main chain | * >=1 : this many blocks deep in the main chain | ||||
*/ | */ | ||||
int GetDepthInMainChain(const CBlockIndex *&pindexRet) const; | int GetDepthInMainChain() const; | ||||
int GetDepthInMainChain() const { | bool IsInMainChain() const { return GetDepthInMainChain() > 0; } | ||||
const CBlockIndex *pindexRet; | |||||
return GetDepthInMainChain(pindexRet); | |||||
} | |||||
bool IsInMainChain() const { | |||||
const CBlockIndex *pindexRet; | |||||
return GetDepthInMainChain(pindexRet) > 0; | |||||
} | |||||
/** | /** | ||||
* @return number of blocks to maturity for this transaction: | * @return number of blocks to maturity for this transaction: | ||||
* 0 : is not a coinbase transaction, or is a mature coinbase transaction | * 0 : is not a coinbase transaction, or is a mature coinbase transaction | ||||
* >0 : is a coinbase transaction which matures in this many blocks | * >0 : is a coinbase transaction which matures in this many blocks | ||||
*/ | */ | ||||
int GetBlocksToMaturity() const; | int GetBlocksToMaturity() const; | ||||
bool hashUnset() const { | bool hashUnset() const { | ||||
return (hashBlock.IsNull() || hashBlock == ABANDON_HASH); | return (hashBlock.IsNull() || hashBlock == ABANDON_HASH); | ||||
▲ Show 20 Lines • Show All 1,153 Lines • Show Last 20 Lines |