37 return std::make_optional(ext_it->second);
std::optional< CTxOut > GetExternalOutput(const COutPoint &outpoint) const
Returns the external output for the given outpoint if it exists.
bool m_avoid_partial_spends
Avoid partial use of funds sent to a given address.
bool GetBoolArg(const std::string &strArg, bool fDefault) const
Return boolean argument or default value.
std::map< COutPoint, int64_t > m_input_weights
Map of COutPoints to the maximum weight for that input.
void SelectExternal(const COutPoint &outpoint, const CTxOut &txout)
Lock-in the given output as an external input for spending because it is not in the wallet...
bool IsSelected(const COutPoint &output) const
Returns true if the given output is pre-selected.
bool HasSelected() const
Returns true if there are pre-selected inputs.
void UnSelect(const COutPoint &output)
Unselects the given output.
void Select(const COutPoint &output)
Lock-in the given output for spending.
int64_t GetInputWeight(const COutPoint &outpoint) const
Returns the input weight.
static constexpr bool DEFAULT_AVOIDPARTIALSPENDS
Default for -avoidpartialspends.
std::map< COutPoint, CTxOut > m_external_txouts
Map of external inputs to include in the transaction These are not in the wallet, so we need to track...
void SetInputWeight(const COutPoint &outpoint, int64_t weight)
Set an input's weight.
bool IsExternalSelected(const COutPoint &output) const
Returns true if the given output is selected as an external input.
void UnSelectAll()
Unselects all outputs.
An output of a transaction.
An outpoint - a combination of a transaction hash and an index n into its vout.
std::set< COutPoint > m_selected_inputs
Selected inputs (inputs that will be used, regardless of whether they're optimal or not) ...
std::vector< COutPoint > ListSelected() const
List the selected inputs.
bool HasInputWeight(const COutPoint &outpoint) const
Returns true if the input weight is set.