Skip to content

Commit 031d12a

Browse files
committed
Add requested changes
1 parent 5791d61 commit 031d12a

File tree

3 files changed

+242
-114
lines changed

3 files changed

+242
-114
lines changed

src/types.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,19 @@ pub struct WeightedUtxo {
147147
pub utxo: Utxo,
148148
}
149149

150+
/// A [`TxOut`] with its `satisfaction_weight`, if it were spend by the wallet owning the produced
151+
/// UTXO from this TxOut.
152+
#[derive(Debug, Clone, PartialEq)]
153+
pub struct WeightedTxOut {
154+
/// The weight of the witness data and `scriptSig` expressed in [weight units]. This is used to
155+
/// properly compute the cost of change for waste metric.
156+
///
157+
/// [weight units]: https://en.bitcoin.it/wiki/Weight_units
158+
pub satisfaction_weight: usize,
159+
/// The TxOut
160+
pub txout: TxOut,
161+
}
162+
150163
#[derive(Debug, Clone, PartialEq)]
151164
/// An unspent transaction output (UTXO).
152165
pub enum Utxo {

0 commit comments

Comments
 (0)