Skip to content

Commit c1d7c92

Browse files
f - clarify comments
1 parent 747a8e6 commit c1d7c92

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
@@ -2312,8 +2312,9 @@ where
23122312
/// public, and thus should be called whenever the result is going to be passed out in a
23132313
/// [`MessageSendEvent::BroadcastChannelUpdate`] event.
23142314
///
2315-
/// Note that this function may be called without the `peer_state` corresponding to the passed
2316-
/// channel's counterparty acquired, when the call site has full ownership of the channel.
2315+
/// Note that in `internal_closing_signed`, this function is called without the `peer_state`
2316+
/// corresponding to the channel's counterparty locked, as the channel been removed from the
2317+
/// storage and the `peer_state` lock has been dropped.
23172318
fn get_channel_update_for_broadcast(&self, chan: &Channel<<SP::Target as SignerProvider>::Signer>) -> Result<msgs::ChannelUpdate, LightningError> {
23182319
if !chan.should_announce() {
23192320
return Err(LightningError {
@@ -2332,8 +2333,10 @@ where
23322333
/// is public (only returning an Err if the channel does not yet have an assigned short_id),
23332334
/// and thus MUST NOT be called unless the recipient of the resulting message has already
23342335
/// provided evidence that they know about the existence of the channel.
2335-
/// Note that this function may be called without the `peer_state` corresponding to the passed
2336-
/// channel's counterparty acquired, when the call site has full ownership of the channel.
2336+
///
2337+
/// Note that through `internal_closing_signed`, this function is called without the
2338+
/// `peer_state` corresponding to the channel's counterparty locked, as the channel been
2339+
/// removed from the storage and the `peer_state` lock has been dropped.
23372340
fn get_channel_update_for_unicast(&self, chan: &Channel<<SP::Target as SignerProvider>::Signer>) -> Result<msgs::ChannelUpdate, LightningError> {
23382341
log_trace!(self.logger, "Attempting to generate channel update for channel {}", log_bytes!(chan.channel_id()));
23392342
let short_channel_id = match chan.get_short_channel_id().or(chan.latest_inbound_scid_alias()) {

0 commit comments

Comments
 (0)