@@ -8482,8 +8482,10 @@ impl<SP: Deref> FundedChannel<SP> where
84828482
84838483 if is_funding_tx_confirmed {
84848484 if let Some(channel_ready) = self.check_get_channel_ready(height, logger) {
8485- for &(_, tx) in txdata.iter() {
8486- self.context.check_for_funding_tx_spent(&self.funding, tx, logger)?;
8485+ for &(idx, tx) in txdata.iter() {
8486+ if idx > index_in_block {
8487+ self.context.check_for_funding_tx_spent(&self.funding, tx, logger)?;
8488+ }
84878489 }
84888490
84898491 log_info!(logger, "Sending a channel_ready to our peer for channel {}", &self.context.channel_id);
@@ -8522,8 +8524,10 @@ impl<SP: Deref> FundedChannel<SP> where
85228524 let funding = self.pending_funding.get(confirmed_funding_index).unwrap();
85238525
85248526 if let Some(splice_locked) = self.check_get_splice_locked(pending_splice, funding, height) {
8525- for &(_, tx) in txdata.iter() {
8526- self.context.check_for_funding_tx_spent(funding, tx, logger)?;
8527+ for &(idx, tx) in txdata.iter() {
8528+ if idx > index_in_block {
8529+ self.context.check_for_funding_tx_spent(funding, tx, logger)?;
8530+ }
85278531 }
85288532
85298533 log_info!(logger, "Sending a splice_locked to our peer for channel {}", &self.context.channel_id);
0 commit comments