Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.h
Show First 20 Lines • Show All 509 Lines • ▼ Show 20 Lines | public: | ||||
std::set<TxId> GetConflicts() const NO_THREAD_SAFETY_ANALYSIS; | std::set<TxId> GetConflicts() const NO_THREAD_SAFETY_ANALYSIS; | ||||
/** | /** | ||||
* 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(interfaces::Chain::Lock &locked_chain) const; | // TODO: Remove "NO_THREAD_SAFETY_ANALYSIS" and replace it with the correct | ||||
// annotation "EXCLUSIVE_LOCKS_REQUIRED(pwallet->cs_wallet)". The annotation | |||||
// "NO_THREAD_SAFETY_ANALYSIS" was temporarily added to avoid having to | |||||
// resolve the issue of member access into incomplete type CWallet. Note | |||||
// that we still have the runtime check "AssertLockHeld(pwallet->cs_wallet)" | |||||
// in place. | |||||
int GetDepthInMainChain(interfaces::Chain::Lock &locked_chain) const | |||||
NO_THREAD_SAFETY_ANALYSIS; | |||||
bool IsInMainChain(interfaces::Chain::Lock &locked_chain) const { | bool IsInMainChain(interfaces::Chain::Lock &locked_chain) const { | ||||
return GetDepthInMainChain(locked_chain) > 0; | return GetDepthInMainChain(locked_chain) > 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 | ||||
▲ Show 20 Lines • Show All 921 Lines • Show Last 20 Lines |