Skip to content

Commit a561f24

Browse files
committed
wip2
1 parent 74b7863 commit a561f24

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

lightning/src/ln/channel.rs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8561,6 +8561,13 @@ where
85618561
self.context.counterparty_next_commitment_point = Some(msg.next_per_commitment_point);
85628562
self.context.counterparty_next_commitment_transaction_number -= 1;
85638563

8564+
log_trace!(
8565+
logger,
8566+
"FundedChannel {} new counterparty_next_commitment_transaction_number: {}",
8567+
self.context.channel_id(),
8568+
self.context.counterparty_next_commitment_transaction_number
8569+
);
8570+
85648571
if self.context.announcement_sigs_state == AnnouncementSigsState::Committed {
85658572
self.context.announcement_sigs_state = AnnouncementSigsState::PeerReceived;
85668573
}
@@ -8773,13 +8780,13 @@ where
87738780
};
87748781
macro_rules! return_with_htlcs_to_fail {
87758782
($htlcs_to_fail: expr) => {
8776-
monitor_update.encoded_channel = Some(self.encode());
87778783
if !release_monitor {
87788784
self.context
87798785
.blocked_monitor_updates
87808786
.push(PendingChannelMonitorUpdate { update: monitor_update });
87818787
return Ok(($htlcs_to_fail, static_invoices, None));
87828788
} else {
8789+
monitor_update.encoded_channel = Some(self.encode());
87838790
return Ok(($htlcs_to_fail, static_invoices, Some(monitor_update)));
87848791
}
87858792
};
@@ -10854,10 +10861,9 @@ where
1085410861
if self.context.blocked_monitor_updates.is_empty() {
1085510862
return None;
1085610863
}
10857-
Some((
10858-
self.context.blocked_monitor_updates.remove(0).update,
10859-
!self.context.blocked_monitor_updates.is_empty(),
10860-
))
10864+
let mut update = self.context.blocked_monitor_updates.remove(0).update;
10865+
update.encoded_channel = Some(self.encode());
10866+
Some((update, !self.context.blocked_monitor_updates.is_empty()))
1086110867
}
1086210868

1086310869
/// Pushes a new monitor update into our monitor update queue, returning it if it should be

0 commit comments

Comments
 (0)