From 63217bc9efd1d3fa8cee41cdd1d47ae7f5d311bd Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Wed, 31 May 2023 22:51:49 +0000 Subject: [PATCH] Some minor comment/doc tweaks in new monitor update blocking code A few nits that came up in review to make the docs clearer, but not anything super critical. --- lightning/src/ln/channel.rs | 4 ++++ lightning/src/ln/channelmanager.rs | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lightning/src/ln/channel.rs b/lightning/src/ln/channel.rs index db3858823..dc55c33dc 100644 --- a/lightning/src/ln/channel.rs +++ b/lightning/src/ln/channel.rs @@ -527,6 +527,10 @@ pub(super) struct ReestablishResponses { } /// The return type of `force_shutdown` +/// +/// Contains a (counterparty_node_id, funding_txo, [`ChannelMonitorUpdate`]) tuple +/// followed by a list of HTLCs to fail back in the form of the (source, payment hash, and this +/// channel's counterparty_node_id and channel_id). pub(crate) type ShutdownResult = ( Option<(PublicKey, OutPoint, ChannelMonitorUpdate)>, Vec<(HTLCSource, PaymentHash, PublicKey, [u8; 32])> diff --git a/lightning/src/ln/channelmanager.rs b/lightning/src/ln/channelmanager.rs index 5dacda715..7d28fc42a 100644 --- a/lightning/src/ln/channelmanager.rs +++ b/lightning/src/ln/channelmanager.rs @@ -5695,7 +5695,7 @@ where } /// Checks whether [`ChannelMonitorUpdate`]s generated by the receipt of a remote - /// [`msgs::RevokeAndACK`] should be held for the given channel until some other event + /// [`msgs::RevokeAndACK`] should be held for the given channel until some other action /// completes. Note that this needs to happen in the same [`PeerState`] mutex as any release of /// the [`ChannelMonitorUpdate`] in question. fn raa_monitor_updates_held(&self, @@ -6312,7 +6312,7 @@ where /// When something which was blocking a channel from updating its [`ChannelMonitor`] (e.g. an /// [`Event`] being handled) completes, this should be called to restore the channel to normal /// operation. It will double-check that nothing *else* is also blocking the same channel from - /// making progress and then any blocked [`ChannelMonitorUpdate`]s fly. + /// making progress and then let any blocked [`ChannelMonitorUpdate`]s fly. fn handle_monitor_update_release(&self, counterparty_node_id: PublicKey, channel_funding_outpoint: OutPoint, mut completed_blocker: Option) { let mut errors = Vec::new(); loop { -- 2.39.5