Add method to convert FundingTxInput to Utxo
What changed, and why it matters
This commit adds a simple public helper method that exposes the internal Utxo field of a FundingTxInput object. It is a pure API convenience with no security-relevant behavior change.
No security action needed; treat as routine API addition.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch introduces FundingTxInput::into_utxo(self) -> Utxo, which returns the owned self.utxo field. The field was already stored inside the struct; the change only makes it accessible to callers. No logic, validation, cryptography, or network handling is modified.
Changed components
lightning/src/ln/funding.rsInspect captured patch +5 / −0
diff --git a/lightning/src/ln/funding.rs b/lightning/src/ln/funding.rs
index 7281a5f..f80b2b6 100644
--- a/lightning/src/ln/funding.rs
+++ b/lightning/src/ln/funding.rs
@@ -230,4 +230,9 @@ impl FundingTxInput {
pub fn set_sequence(&mut self, sequence: Sequence) {
self.sequence = sequence;
}
+
+ /// Converts the [`FundingTxInput`] into a [`Utxo`] for coin selection.
+ pub fn into_utxo(self) -> Utxo {
+ self.utxo
+ }
}
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.