Skip to content

Commit b8bbc15

Browse files
committed
f - check pending_splice.sent_funding_txid
1 parent 9ea70be commit b8bbc15

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

lightning/src/ln/channel.rs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9125,7 +9125,7 @@ where
91259125

91269126
#[cfg(splicing)]
91279127
fn maybe_promote_splice_funding<L: Deref>(
9128-
&mut self, splice_txid: Txid, confirmed_funding_index: usize, logger: &L,
9128+
&mut self, confirmed_funding_index: usize, logger: &L,
91299129
) -> bool
91309130
where
91319131
L::Target: Logger,
@@ -9134,6 +9134,14 @@ where
91349134
debug_assert!(confirmed_funding_index < self.pending_funding.len());
91359135

91369136
let pending_splice = self.pending_splice.as_mut().unwrap();
9137+
let splice_txid = match pending_splice.sent_funding_txid {
9138+
Some(sent_funding_txid) => sent_funding_txid,
9139+
None => {
9140+
debug_assert!(false);
9141+
return false;
9142+
},
9143+
};
9144+
91379145
if pending_splice.sent_funding_txid == pending_splice.received_funding_txid {
91389146
log_info!(
91399147
logger,
@@ -9261,7 +9269,7 @@ where
92619269
);
92629270

92639271
let announcement_sigs = self
9264-
.maybe_promote_splice_funding(splice_locked.splice_txid, confirmed_funding_index, logger)
9272+
.maybe_promote_splice_funding(confirmed_funding_index, logger)
92659273
.then(|| self.get_announcement_sigs(node_signer, chain_hash, user_config, height, logger))
92669274
.flatten();
92679275

@@ -9427,7 +9435,7 @@ where
94279435
log_info!(logger, "Sending a splice_locked to our peer for channel {}", &self.context.channel_id);
94289436

94299437
let announcement_sigs = self
9430-
.maybe_promote_splice_funding(splice_locked.splice_txid, confirmed_funding_index, logger)
9438+
.maybe_promote_splice_funding(confirmed_funding_index, logger)
94319439
.then(|| chain_node_signer
94329440
.and_then(|(chain_hash, node_signer, user_config)|
94339441
self.get_announcement_sigs(node_signer, chain_hash, user_config, height, logger)

0 commit comments

Comments
 (0)