Update Watch docs to disallow dup channel outpoints
authorValentine Wallace <vwallace@protonmail.com>
Fri, 17 Sep 2021 18:50:44 +0000 (14:50 -0400)
committerValentine Wallace <vwallace@protonmail.com>
Fri, 17 Sep 2021 18:50:44 +0000 (14:50 -0400)
on watch_channel

lightning/src/chain/mod.rs

index cec09459233daef7b9c38582e17f984d10fa0d6d..718990c4557bc30676179e13bc3afecbbec07e06 100644 (file)
@@ -203,6 +203,9 @@ pub trait Watch<ChannelSigner: Sign> {
        /// with any spends of outputs returned by [`get_outputs_to_watch`]. In practice, this means
        /// calling [`block_connected`] and [`block_disconnected`] on the monitor.
        ///
+       /// Note: this interface MUST error with `ChannelMonitorUpdateErr::PermanentFailure` if
+       /// the given `funding_txo` has previously been registered via `watch_channel`.
+       ///
        /// [`get_outputs_to_watch`]: channelmonitor::ChannelMonitor::get_outputs_to_watch
        /// [`block_connected`]: channelmonitor::ChannelMonitor::block_connected
        /// [`block_disconnected`]: channelmonitor::ChannelMonitor::block_disconnected