What changed, and why it matters
This commit removes an unused internal variable called original_funding_txo from the code that handles Bitcoin Lightning channel splicing. The variable was stored during splicing setup but never actually used afterward. There is no security issue here—it's a straightforward cleanup that reduces code clutter and avoids storing unnecessary data.
No security action needed. Treat as normal code cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch deletes the original_funding_txo field from the SpliceInstructions struct and its TLV serialization tag, and removes the code that populated it from self.funding.get_funding_txo(). The commit message explicitly states this field became unused after an earlier design iteration. No logic changes, no security fixes, no bug fixes.
Changed components
lightning/src/ln/channel.rsSpliceInstructions structsplice initialization codeInspect captured patch +0 / −9
diff --git a/lightning/src/ln/channel.rs b/lightning/src/ln/channel.rs
index ee80d3e..3d25934 100644
--- a/lightning/src/ln/channel.rs
+++ b/lightning/src/ln/channel.rs
@@ -2470,7 +2470,6 @@ pub(crate) struct SpliceInstructions {
change_script: Option<ScriptBuf>,
funding_feerate_per_kw: u32,
locktime: u32,
- original_funding_txo: OutPoint,
}
impl_writeable_tlv_based!(SpliceInstructions, {
@@ -2480,7 +2479,6 @@ impl_writeable_tlv_based!(SpliceInstructions, {
(7, change_script, option),
(9, funding_feerate_per_kw, required),
(11, locktime, required),
- (13, original_funding_txo, required),
});
pub(crate) enum QuiescentAction {
@@ -11184,11 +11182,6 @@ where
}
}
- let original_funding_txo = self.funding.get_funding_txo().ok_or_else(|| {
- debug_assert!(false);
- APIError::APIMisuseError { err: "Channel isn't yet fully funded".to_owned() }
- })?;
-
let (our_funding_inputs, our_funding_outputs, change_script) = contribution.into_tx_parts();
let action = QuiescentAction::Splice(SpliceInstructions {
@@ -11198,7 +11191,6 @@ where
change_script,
funding_feerate_per_kw,
locktime,
- original_funding_txo,
});
self.propose_quiescence(logger, action)
.map_err(|e| APIError::APIMisuseError { err: e.to_owned() })
@@ -11215,7 +11207,6 @@ where
change_script,
funding_feerate_per_kw,
locktime,
- original_funding_txo,
} = instructions;
// Check if a splice has been initiated already.
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.