Skip to content

Commit 5d2c0a6

Browse files
f - clarify comments
1 parent 2010abc commit 5d2c0a6

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
@@ -2254,8 +2254,9 @@ where
22542254
/// public, and thus should be called whenever the result is going to be passed out in a
22552255
/// [`MessageSendEvent::BroadcastChannelUpdate`] event.
22562256
///
2257-
/// Note that this function may be called without the `peer_state` corresponding to the passed
2258-
/// channel's counterparty acquired, when the call site has full ownership of the channel.
2257+
/// Note that in `internal_closing_signed`, this function is called without the `peer_state`
2258+
/// corresponding to the channel's counterparty locked, as the channel been removed from the
2259+
/// storage and the `peer_state` lock has been dropped.
22592260
fn get_channel_update_for_broadcast(&self, chan: &Channel<<SP::Target as SignerProvider>::Signer>) -> Result<msgs::ChannelUpdate, LightningError> {
22602261
if !chan.should_announce() {
22612262
return Err(LightningError {
@@ -2274,8 +2275,10 @@ where
22742275
/// is public (only returning an Err if the channel does not yet have an assigned short_id),
22752276
/// and thus MUST NOT be called unless the recipient of the resulting message has already
22762277
/// provided evidence that they know about the existence of the channel.
2277-
/// Note that this function may be called without the `peer_state` corresponding to the passed
2278-
/// channel's counterparty acquired, when the call site has full ownership of the channel.
2278+
///
2279+
/// Note that through `internal_closing_signed`, this function is called without the
2280+
/// `peer_state` corresponding to the channel's counterparty locked, as the channel been
2281+
/// removed from the storage and the `peer_state` lock has been dropped.
22792282
fn get_channel_update_for_unicast(&self, chan: &Channel<<SP::Target as SignerProvider>::Signer>) -> Result<msgs::ChannelUpdate, LightningError> {
22802283
log_trace!(self.logger, "Attempting to generate channel update for channel {}", log_bytes!(chan.channel_id()));
22812284
let short_channel_id = match chan.get_short_channel_id().or(chan.latest_inbound_scid_alias()) {

0 commit comments

Comments
 (0)