Skip to content

Commit 5208684

Browse files
committed
f - skip check_for_funding_tx_spent
1 parent a0cd76c commit 5208684

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

lightning/src/ln/channel.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)