Skip to content

Commit 12920d8

Browse files
authored
Merge pull request #3417 from dunxen/2024-11-removenextfundingtxidpersist
Remove `next_funding_txid` tlv from `Channel` read/write
2 parents 70ace81 + 7177acb commit 12920d8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lightning/src/ln/channel.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -9515,7 +9515,6 @@ impl<SP: Deref> Writeable for Channel<SP> where SP::Target: SignerProvider {
95159515
(49, self.context.local_initiated_shutdown, option), // Added in 0.0.122
95169516
(51, is_manual_broadcast, option), // Added in 0.0.124
95179517
(53, funding_tx_broadcast_safe_event_emitted, option), // Added in 0.0.124
9518-
(55, self.context.next_funding_txid, option) // Added in 0.1.0
95199518
});
95209519

95219520
Ok(())
@@ -9805,7 +9804,6 @@ impl<'a, 'b, 'c, ES: Deref, SP: Deref> ReadableArgs<(&'a ES, &'b SP, u32, &'c Ch
98059804
let mut channel_pending_event_emitted = None;
98069805
let mut channel_ready_event_emitted = None;
98079806
let mut funding_tx_broadcast_safe_event_emitted = None;
9808-
let mut next_funding_txid = funding_transaction.as_ref().map(|tx| tx.compute_txid());
98099807

98109808
let mut user_id_high_opt: Option<u64> = None;
98119809
let mut channel_keys_id: Option<[u8; 32]> = None;
@@ -9866,7 +9864,6 @@ impl<'a, 'b, 'c, ES: Deref, SP: Deref> ReadableArgs<(&'a ES, &'b SP, u32, &'c Ch
98669864
(49, local_initiated_shutdown, option),
98679865
(51, is_manual_broadcast, option),
98689866
(53, funding_tx_broadcast_safe_event_emitted, option),
9869-
(55, next_funding_txid, option) // Added in 0.0.125
98709867
});
98719868

98729869
let (channel_keys_id, holder_signer) = if let Some(channel_keys_id) = channel_keys_id {
@@ -10127,10 +10124,13 @@ impl<'a, 'b, 'c, ES: Deref, SP: Deref> ReadableArgs<(&'a ES, &'b SP, u32, &'c Ch
1012710124

1012810125
blocked_monitor_updates: blocked_monitor_updates.unwrap(),
1012910126
is_manual_broadcast: is_manual_broadcast.unwrap_or(false),
10127+
// TODO(dual_funding): Instead of getting this from persisted value, figure it out based on the
10128+
// funding transaction and other channel state.
10129+
//
1013010130
// If we've sent `commtiment_signed` for an interactively constructed transaction
1013110131
// during a signing session, but have not received `tx_signatures` we MUST set `next_funding_txid`
1013210132
// to the txid of that interactive transaction, else we MUST NOT set it.
10133-
next_funding_txid,
10133+
next_funding_txid: None,
1013410134
},
1013510135
interactive_tx_signing_session: None,
1013610136
})

0 commit comments

Comments
 (0)