Bitcoin Core 28.99.0
P2P Digital Currency
Public Member Functions | Private Attributes | List of all members
wallet::PreselectedInput Class Reference

#include <coincontrol.h>

Public Member Functions

void SetTxOut (const CTxOut &txout)
 Set the previous output for this input. More...
 
CTxOut GetTxOut () const
 Retrieve the previous output for this input. More...
 
bool HasTxOut () const
 Return whether the previous output is set for this input. More...
 
void SetInputWeight (int64_t weight)
 Set the weight for this input. More...
 
std::optional< int64_t > GetInputWeight () const
 Retrieve the input weight for this input. More...
 
void SetSequence (uint32_t sequence)
 Set the sequence for this input. More...
 
std::optional< uint32_t > GetSequence () const
 Retrieve the sequence for this input. More...
 
void SetScriptSig (const CScript &script)
 Set the scriptSig for this input. More...
 
void SetScriptWitness (const CScriptWitness &script_wit)
 Set the scriptWitness for this input. More...
 
bool HasScripts () const
 Return whether either the scriptSig or scriptWitness are set for this input. More...
 
std::pair< std::optional< CScript >, std::optional< CScriptWitness > > GetScripts () const
 Retrieve both the scriptSig and the scriptWitness. More...
 
void SetPosition (unsigned int pos)
 Store the position of this input. More...
 
std::optional< unsigned int > GetPosition () const
 Retrieve the position of this input. More...
 

Private Attributes

std::optional< CTxOutm_txout
 The previous output being spent by this input. More...
 
std::optional< int64_t > m_weight
 The input weight for spending this input. More...
 
std::optional< uint32_t > m_sequence
 The sequence number for this input. More...
 
std::optional< CScriptm_script_sig
 The scriptSig for this input. More...
 
std::optional< CScriptWitnessm_script_witness
 The scriptWitness for this input. More...
 
std::optional< unsigned int > m_pos
 The position in the inputs vector for this input. More...
 

Detailed Description

Definition at line 27 of file coincontrol.h.

Member Function Documentation

◆ GetInputWeight()

std::optional< int64_t > wallet::PreselectedInput::GetInputWeight ( ) const

Retrieve the input weight for this input.

Definition at line 111 of file coincontrol.cpp.

◆ GetPosition()

std::optional< unsigned int > wallet::PreselectedInput::GetPosition ( ) const

Retrieve the position of this input.

Definition at line 151 of file coincontrol.cpp.

◆ GetScripts()

std::pair< std::optional< CScript >, std::optional< CScriptWitness > > wallet::PreselectedInput::GetScripts ( ) const

Retrieve both the scriptSig and the scriptWitness.

Definition at line 141 of file coincontrol.cpp.

◆ GetSequence()

std::optional< uint32_t > wallet::PreselectedInput::GetSequence ( ) const

Retrieve the sequence for this input.

Definition at line 121 of file coincontrol.cpp.

◆ GetTxOut()

CTxOut wallet::PreselectedInput::GetTxOut ( ) const

Retrieve the previous output for this input.

Definition at line 95 of file coincontrol.cpp.

Here is the call graph for this function:

◆ HasScripts()

bool wallet::PreselectedInput::HasScripts ( ) const

Return whether either the scriptSig or scriptWitness are set for this input.

Definition at line 136 of file coincontrol.cpp.

◆ HasTxOut()

bool wallet::PreselectedInput::HasTxOut ( ) const

Return whether the previous output is set for this input.

Definition at line 101 of file coincontrol.cpp.

◆ SetInputWeight()

void wallet::PreselectedInput::SetInputWeight ( int64_t  weight)

Set the weight for this input.

Definition at line 106 of file coincontrol.cpp.

◆ SetPosition()

void wallet::PreselectedInput::SetPosition ( unsigned int  pos)

Store the position of this input.

Definition at line 146 of file coincontrol.cpp.

◆ SetScriptSig()

void wallet::PreselectedInput::SetScriptSig ( const CScript script)

Set the scriptSig for this input.

Definition at line 126 of file coincontrol.cpp.

Here is the caller graph for this function:

◆ SetScriptWitness()

void wallet::PreselectedInput::SetScriptWitness ( const CScriptWitness script_wit)

Set the scriptWitness for this input.

Definition at line 131 of file coincontrol.cpp.

Here is the caller graph for this function:

◆ SetSequence()

void wallet::PreselectedInput::SetSequence ( uint32_t  sequence)

Set the sequence for this input.

Definition at line 116 of file coincontrol.cpp.

Here is the caller graph for this function:

◆ SetTxOut()

void wallet::PreselectedInput::SetTxOut ( const CTxOut txout)

Set the previous output for this input.

Only necessary if the input is expected to be an external input.

Definition at line 90 of file coincontrol.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ m_pos

std::optional<unsigned int> wallet::PreselectedInput::m_pos
private

The position in the inputs vector for this input.

Definition at line 41 of file coincontrol.h.

◆ m_script_sig

std::optional<CScript> wallet::PreselectedInput::m_script_sig
private

The scriptSig for this input.

Definition at line 37 of file coincontrol.h.

◆ m_script_witness

std::optional<CScriptWitness> wallet::PreselectedInput::m_script_witness
private

The scriptWitness for this input.

Definition at line 39 of file coincontrol.h.

◆ m_sequence

std::optional<uint32_t> wallet::PreselectedInput::m_sequence
private

The sequence number for this input.

Definition at line 35 of file coincontrol.h.

◆ m_txout

std::optional<CTxOut> wallet::PreselectedInput::m_txout
private

The previous output being spent by this input.

Definition at line 31 of file coincontrol.h.

◆ m_weight

std::optional<int64_t> wallet::PreselectedInput::m_weight
private

The input weight for spending this input.

Definition at line 33 of file coincontrol.h.


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