Remove FundedChannel::pending_funding persistence
What changed, and why it matters
This commit removes the saving and loading of a field called pending_funding from a channel's on-disk state. After the change, the field is simply initialized as an empty list when a channel is loaded. The commit message says this data is moving to a different structure (PendingSplice) and will be persisted there later. There is no direct evidence this is a security fix; it appears to be a data-model refactor.
Treat as a normal refactor commit. If the project supports in-flight splices, verify that pending_funding data is not lost across restarts before PendingSplice persistence is actually implemented, as that could lead to operational or safety issues. No immediate security patch action is indicated by the diff alone.
Security signals we found
Persistence of channel state field removed
Field initialized to empty on deserialization, which could affect splice-in-progress recovery if pending_funding was non-empty at rest
Evidence from the diff
The patch drops field index 54 (pending_funding, optional_vec) from the serialization and deserialization of FundedChannel in lightning/src/ln/channel.rs. On write, the field is no longer emitted; on read, the local variable is removed and the struct field is set to an empty Vec. The commit message frames this as preparation for moving pending_funding into PendingSplice persistence. No functional logic changes are visible in the diff beyond the persistence removal.
Changed components
lightning/src/ln/channel.rsFundedChannel serialization/deserializationpending_funding fieldInspect captured patch +1 / −4
diff --git a/lightning/src/ln/channel.rs b/lightning/src/ln/channel.rs
index e44b9eb..12c4bd8 100644
--- a/lightning/src/ln/channel.rs
+++ b/lightning/src/ln/channel.rs
@@ -14265,7 +14265,6 @@ where
(49, self.context.local_initiated_shutdown, option), // Added in 0.0.122
(51, is_manual_broadcast, option), // Added in 0.0.124
(53, funding_tx_broadcast_safe_event_emitted, option), // Added in 0.0.124
- (54, self.pending_funding, optional_vec), // Added in 0.2
(55, removed_htlc_attribution_data, optional_vec), // Added in 0.2
(57, holding_cell_attribution_data, optional_vec), // Added in 0.2
(58, self.interactive_tx_signing_session, option), // Added in 0.2
@@ -14628,7 +14627,6 @@ where
let mut holder_commitment_point_pending_next_opt: Option<PublicKey> = None;
let mut is_manual_broadcast = None;
- let mut pending_funding = Some(Vec::new());
let mut historical_scids = Some(Vec::new());
let mut interactive_tx_signing_session: Option<InteractiveTxSigningSession> = None;
@@ -14672,7 +14670,6 @@ where
(49, local_initiated_shutdown, option),
(51, is_manual_broadcast, option),
(53, funding_tx_broadcast_safe_event_emitted, option),
- (54, pending_funding, optional_vec), // Added in 0.2
(55, removed_htlc_attribution_data, optional_vec), // Added in 0.2
(57, holding_cell_attribution_data, optional_vec), // Added in 0.2
(58, interactive_tx_signing_session, option), // Added in 0.2
@@ -14929,7 +14926,7 @@ where
short_channel_id,
minimum_depth_override,
},
- pending_funding: pending_funding.unwrap(),
+ pending_funding: Vec::new(),
context: ChannelContext {
user_id,
Why this scored 12/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.