Skip to content

Commit ec7b1c5

Browse files
f - clarify comments
1 parent 2fb5eba commit ec7b1c5

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2226,8 +2226,9 @@ where
22262226
/// public, and thus should be called whenever the result is going to be passed out in a
22272227
/// [`MessageSendEvent::BroadcastChannelUpdate`] event.
22282228
///
2229-
/// Note that this function may be called without the `peer_state` corresponding to the passed
2230-
/// channel's counterparty acquired, when the call site has full ownership of the channel.
2229+
/// Note that in `internal_closing_signed`, this function is called without the `peer_state`
2230+
/// corresponding to the channel's counterparty locked, as the channel been removed from the
2231+
/// storage and the `peer_state` lock has been dropped.
22312232
fn get_channel_update_for_broadcast(&self, chan: &Channel<<SP::Target as SignerProvider>::Signer>) -> Result<msgs::ChannelUpdate, LightningError> {
22322233
if !chan.should_announce() {
22332234
return Err(LightningError {
@@ -2246,8 +2247,10 @@ where
22462247
/// is public (only returning an Err if the channel does not yet have an assigned short_id),
22472248
/// and thus MUST NOT be called unless the recipient of the resulting message has already
22482249
/// provided evidence that they know about the existence of the channel.
2249-
/// Note that this function may be called without the `peer_state` corresponding to the passed
2250-
/// channel's counterparty acquired, when the call site has full ownership of the channel.
2250+
///
2251+
/// Note that through `internal_closing_signed`, this function is called without the
2252+
/// `peer_state` corresponding to the channel's counterparty locked, as the channel been
2253+
/// removed from the storage and the `peer_state` lock has been dropped.
22512254
fn get_channel_update_for_unicast(&self, chan: &Channel<<SP::Target as SignerProvider>::Signer>) -> Result<msgs::ChannelUpdate, LightningError> {
22522255
log_trace!(self.logger, "Attempting to generate channel update for channel {}", log_bytes!(chan.channel_id()));
22532256
let short_channel_id = match chan.get_short_channel_id().or(chan.latest_inbound_scid_alias()) {

0 commit comments

Comments
 (0)