@@ -330,6 +330,11 @@ pub trait Watch<ChannelSigner: EcdsaChannelSigner> {
330330pub trait Filter {
331331 /// Registers interest in a transaction with `txid` and having an output with `script_pubkey` as
332332 /// a spending condition.
333+ ///
334+ /// This may be used, for example, to monitor for when a funding transaction confirms.
335+ ///
336+ /// The `script_pubkey` is provided for informational purposes and may be useful for block
337+ /// sources which only support filtering on scripts.
333338 fn register_tx ( & self , txid : & Txid , script_pubkey : & Script ) ;
334339
335340 /// Registers interest in spends of a transaction output.
@@ -338,6 +343,9 @@ pub trait Filter {
338343 /// to ensure that also dependent output spents within an already connected block are correctly
339344 /// handled, e.g., by re-scanning the block in question whenever new outputs have been
340345 /// registered mid-processing.
346+ ///
347+ /// This may be used, for example, to monitor for when a funding output is spent (by any
348+ /// transaction).
341349 fn register_output ( & self , output : WatchedOutput ) ;
342350}
343351
@@ -350,6 +358,9 @@ pub trait Filter {
350358/// If `block_hash` is `Some`, this indicates the output was created in the corresponding block and
351359/// may have been spent there. See [`Filter::register_output`] for details.
352360///
361+ /// Depending on your block source, you may need one or both of either [`Self::outpoint`] or
362+ /// [`Self::script_pubkey`].
363+ ///
353364/// [`ChannelMonitor`]: channelmonitor::ChannelMonitor
354365/// [`ChannelMonitor::block_connected`]: channelmonitor::ChannelMonitor::block_connected
355366#[ derive( Clone , PartialEq , Eq , Hash ) ]
0 commit comments