pub struct OutputGroup {
pub value: u64,
pub weight: u64,
pub input_count: usize,
pub creation_sequence: Option<u32>,
}
Expand description
Represents an input candidate for Coinselection, either as a single UTXO or a group of UTXOs.
A OutputGroup
can be a single UTXO or a group that should be spent together.
Grouping UTXOs belonging to a single address is privacy preserving than grouping UTXOs belonging to different addresses.
In the UTXO model the output of a transaction is used as the input for the new transaction and hence the name OutputGroup
The library user must craft this structure correctly, as incorrect representation can lead to incorrect selection results.
Fields§
§value: u64
Total value of the UTXO(s) that this WeightedValue
represents.
weight: u64
Total weight of including these UTXO(s) in the transaction.
The txin
fields: prevout
, nSequence
, scriptSigLen
, scriptSig
, scriptWitnessLen
,
and scriptWitness
should all be included.
input_count: usize
The total number of inputs
creation_sequence: Option<u32>
Specifies the relative creation sequence for this group, used only for FIFO selection.
Set to None
if FIFO selection is not required. Sequence numbers are arbitrary indices that denote the relative age of a UTXO group among a set of groups.
To denote the oldest UTXO group, assign it a sequence number of Some(0)
.
Trait Implementations§
Source§impl Clone for OutputGroup
impl Clone for OutputGroup
Source§fn clone(&self) -> OutputGroup
fn clone(&self) -> OutputGroup
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more