#include <coinselection.h>
Definition at line 283 of file coinselection.h.
◆ SelectionResult() [1/2]
◆ SelectionResult() [2/2]
| wallet::SelectionResult::SelectionResult |
( |
| ) |
|
|
delete |
◆ AddInput()
| void wallet::SelectionResult::AddInput |
( |
const OutputGroup & |
group | ) |
|
◆ Clear()
| void wallet::SelectionResult::Clear |
( |
| ) |
|
◆ ComputeAndSetWaste()
| void wallet::SelectionResult::ComputeAndSetWaste |
( |
const CAmount |
min_viable_change, |
|
|
const CAmount |
change_cost, |
|
|
const CAmount |
change_fee |
|
) |
| |
Calculates and stores the waste for this selection via GetSelectionWaste.
Definition at line 409 of file coinselection.cpp.
◆ GetAlgo()
◆ GetChange()
| CAmount wallet::SelectionResult::GetChange |
( |
const CAmount |
min_viable_change, |
|
|
const CAmount |
change_fee |
|
) |
| const |
Get the amount for the change output after paying needed fees.
The change amount is not 100% precise due to discrepancies in fee calculation. The final change amount (if any) should be corrected after calculating the final tx fees. When there is a discrepancy, most of the time the final change would be slightly bigger than estimated.
Following are the possible factors of discrepancy:
- non-input fees always include segwit flags
- input fee estimation always include segwit stack size
- input fees are rounded individually and not collectively, which leads to small rounding errors
- input counter size is always assumed to be 1vbyte
- Parameters
-
| [in] | min_viable_change | Minimum amount for change output, if change would be less then we forgo change |
| [in] | change_fee | Fees to include change output in the tx |
- Returns
- Amount for change output, 0 when there is no change.
Definition at line 495 of file coinselection.cpp.
◆ GetInputSet()
| const std::set< COutput > & wallet::SelectionResult::GetInputSet |
( |
| ) |
const |
◆ GetSelectedEffectiveValue()
| CAmount wallet::SelectionResult::GetSelectedEffectiveValue |
( |
| ) |
const |
◆ GetSelectedValue()
| CAmount wallet::SelectionResult::GetSelectedValue |
( |
| ) |
const |
◆ GetShuffledInputVector()
| std::vector< COutput > wallet::SelectionResult::GetShuffledInputVector |
( |
| ) |
const |
◆ GetTarget()
| CAmount wallet::SelectionResult::GetTarget |
( |
| ) |
const |
|
inline |
◆ GetWaste()
| CAmount wallet::SelectionResult::GetWaste |
( |
| ) |
const |
◆ Merge()
◆ operator<()
◆ m_algo
The algorithm used to produce this result.
Definition at line 291 of file coinselection.h.
◆ m_selected_inputs
| std::set<COutput> wallet::SelectionResult::m_selected_inputs |
|
private |
Set of inputs selected by the algorithm to use in the transaction.
Definition at line 287 of file coinselection.h.
◆ m_target
| CAmount wallet::SelectionResult::m_target |
|
private |
The target the algorithm selected for.
Equal to the recipient amount plus non-input fees
Definition at line 289 of file coinselection.h.
◆ m_use_effective
| bool wallet::SelectionResult::m_use_effective {false} |
|
private |
Whether the input values for calculations should be the effective value (true) or normal value (false)
Definition at line 293 of file coinselection.h.
◆ m_waste
| std::optional<CAmount> wallet::SelectionResult::m_waste |
|
private |
The documentation for this struct was generated from the following files: