Bitcoin Core  22.99.0
P2P Digital Currency
Public Member Functions | Public Attributes | Private Attributes | List of all members
CCoinControl Class Reference

Coin Control Features. More...

#include <coincontrol.h>

Collaboration diagram for CCoinControl:
[legend]

Public Member Functions

 CCoinControl ()
 
bool HasSelected () const
 
bool IsSelected (const COutPoint &output) const
 
bool IsExternalSelected (const COutPoint &output) const
 
bool GetExternalOutput (const COutPoint &outpoint, CTxOut &txout) const
 
void Select (const COutPoint &output)
 
void SelectExternal (const COutPoint &outpoint, const CTxOut &txout)
 
void UnSelect (const COutPoint &output)
 
void UnSelectAll ()
 
void ListSelected (std::vector< COutPoint > &vOutpoints) const
 

Public Attributes

CTxDestination destChange = CNoDestination()
 Custom change destination, if not set an address is generated. More...
 
std::optional< OutputTypem_change_type
 Override the default change type if set, ignored if destChange is set. More...
 
bool m_add_inputs = true
 If false, only selected inputs are used. More...
 
bool m_include_unsafe_inputs = false
 If false, only safe inputs will be used. More...
 
bool fAllowOtherInputs = false
 If false, allows unselected inputs, but requires all selected inputs be used. More...
 
bool fAllowWatchOnly = false
 Includes watch only addresses which are solvable. More...
 
bool fOverrideFeeRate = false
 Override automatic min/max checks on fee, m_feerate must be set if true. More...
 
std::optional< CFeeRatem_feerate
 Override the wallet's m_pay_tx_fee if set. More...
 
std::optional< unsigned int > m_confirm_target
 Override the default confirmation target if set. More...
 
std::optional< bool > m_signal_bip125_rbf
 Override the wallet's m_signal_rbf if set. More...
 
bool m_avoid_partial_spends = DEFAULT_AVOIDPARTIALSPENDS
 Avoid partial use of funds sent to a given address. More...
 
bool m_avoid_address_reuse = false
 Forbids inclusion of dirty (previously used) addresses. More...
 
FeeEstimateMode m_fee_mode = FeeEstimateMode::UNSET
 Fee estimation mode to control arguments to estimateSmartFee. More...
 
int m_min_depth = DEFAULT_MIN_DEPTH
 Minimum chain depth value for coin availability. More...
 
int m_max_depth = DEFAULT_MAX_DEPTH
 Maximum chain depth value for coin availability. More...
 
FlatSigningProvider m_external_provider
 SigningProvider that has pubkeys and scripts to do spend size estimation for external inputs. More...
 

Private Attributes

std::set< COutPointsetSelected
 
std::map< COutPoint, CTxOutm_external_txouts
 

Detailed Description

Coin Control Features.

Definition at line 28 of file coincontrol.h.

Constructor & Destructor Documentation

◆ CCoinControl()

CCoinControl::CCoinControl ( )

Definition at line 9 of file coincontrol.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ GetExternalOutput()

bool CCoinControl::GetExternalOutput ( const COutPoint outpoint,
CTxOut txout 
) const
inline

Definition at line 81 of file coincontrol.h.

Here is the caller graph for this function:

◆ HasSelected()

bool CCoinControl::HasSelected ( ) const
inline

Definition at line 66 of file coincontrol.h.

Here is the caller graph for this function:

◆ IsExternalSelected()

bool CCoinControl::IsExternalSelected ( const COutPoint output) const
inline

Definition at line 76 of file coincontrol.h.

Here is the caller graph for this function:

◆ IsSelected()

bool CCoinControl::IsSelected ( const COutPoint output) const
inline

Definition at line 71 of file coincontrol.h.

Here is the caller graph for this function:

◆ ListSelected()

void CCoinControl::ListSelected ( std::vector< COutPoint > &  vOutpoints) const
inline

Definition at line 112 of file coincontrol.h.

Here is the caller graph for this function:

◆ Select()

void CCoinControl::Select ( const COutPoint output)
inline

Definition at line 91 of file coincontrol.h.

Here is the caller graph for this function:

◆ SelectExternal()

void CCoinControl::SelectExternal ( const COutPoint outpoint,
const CTxOut txout 
)
inline

Definition at line 96 of file coincontrol.h.

Here is the caller graph for this function:

◆ UnSelect()

void CCoinControl::UnSelect ( const COutPoint output)
inline

Definition at line 102 of file coincontrol.h.

Here is the caller graph for this function:

◆ UnSelectAll()

void CCoinControl::UnSelectAll ( )
inline

Definition at line 107 of file coincontrol.h.

Here is the caller graph for this function:

Member Data Documentation

◆ destChange

CTxDestination CCoinControl::destChange = CNoDestination()

Custom change destination, if not set an address is generated.

Definition at line 32 of file coincontrol.h.

◆ fAllowOtherInputs

bool CCoinControl::fAllowOtherInputs = false

If false, allows unselected inputs, but requires all selected inputs be used.

Definition at line 40 of file coincontrol.h.

◆ fAllowWatchOnly

bool CCoinControl::fAllowWatchOnly = false

Includes watch only addresses which are solvable.

Definition at line 42 of file coincontrol.h.

◆ fOverrideFeeRate

bool CCoinControl::fOverrideFeeRate = false

Override automatic min/max checks on fee, m_feerate must be set if true.

Definition at line 44 of file coincontrol.h.

◆ m_add_inputs

bool CCoinControl::m_add_inputs = true

If false, only selected inputs are used.

Definition at line 36 of file coincontrol.h.

◆ m_avoid_address_reuse

bool CCoinControl::m_avoid_address_reuse = false

Forbids inclusion of dirty (previously used) addresses.

Definition at line 54 of file coincontrol.h.

◆ m_avoid_partial_spends

bool CCoinControl::m_avoid_partial_spends = DEFAULT_AVOIDPARTIALSPENDS

Avoid partial use of funds sent to a given address.

Definition at line 52 of file coincontrol.h.

◆ m_change_type

std::optional<OutputType> CCoinControl::m_change_type

Override the default change type if set, ignored if destChange is set.

Definition at line 34 of file coincontrol.h.

◆ m_confirm_target

std::optional<unsigned int> CCoinControl::m_confirm_target

Override the default confirmation target if set.

Definition at line 48 of file coincontrol.h.

◆ m_external_provider

FlatSigningProvider CCoinControl::m_external_provider

SigningProvider that has pubkeys and scripts to do spend size estimation for external inputs.

Definition at line 62 of file coincontrol.h.

◆ m_external_txouts

std::map<COutPoint, CTxOut> CCoinControl::m_external_txouts
private

Definition at line 119 of file coincontrol.h.

◆ m_fee_mode

FeeEstimateMode CCoinControl::m_fee_mode = FeeEstimateMode::UNSET

Fee estimation mode to control arguments to estimateSmartFee.

Definition at line 56 of file coincontrol.h.

◆ m_feerate

std::optional<CFeeRate> CCoinControl::m_feerate

Override the wallet's m_pay_tx_fee if set.

Definition at line 46 of file coincontrol.h.

◆ m_include_unsafe_inputs

bool CCoinControl::m_include_unsafe_inputs = false

If false, only safe inputs will be used.

Definition at line 38 of file coincontrol.h.

◆ m_max_depth

int CCoinControl::m_max_depth = DEFAULT_MAX_DEPTH

Maximum chain depth value for coin availability.

Definition at line 60 of file coincontrol.h.

◆ m_min_depth

int CCoinControl::m_min_depth = DEFAULT_MIN_DEPTH

Minimum chain depth value for coin availability.

Definition at line 58 of file coincontrol.h.

◆ m_signal_bip125_rbf

std::optional<bool> CCoinControl::m_signal_bip125_rbf

Override the wallet's m_signal_rbf if set.

Definition at line 50 of file coincontrol.h.

◆ setSelected

std::set<COutPoint> CCoinControl::setSelected
private

Definition at line 118 of file coincontrol.h.


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