@@ -330,6 +330,11 @@ pub trait Watch<ChannelSigner: EcdsaChannelSigner> {
330
330
pub trait Filter {
331
331
/// Registers interest in a transaction with `txid` and having an output with `script_pubkey` as
332
332
/// 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.
333
338
fn register_tx ( & self , txid : & Txid , script_pubkey : & Script ) ;
334
339
335
340
/// Registers interest in spends of a transaction output.
@@ -338,6 +343,9 @@ pub trait Filter {
338
343
/// to ensure that also dependent output spents within an already connected block are correctly
339
344
/// handled, e.g., by re-scanning the block in question whenever new outputs have been
340
345
/// registered mid-processing.
346
+ ///
347
+ /// This may be used, for example, to monitor for when a funding output is spent (by any
348
+ /// transaction).
341
349
fn register_output ( & self , output : WatchedOutput ) ;
342
350
}
343
351
@@ -350,6 +358,9 @@ pub trait Filter {
350
358
/// If `block_hash` is `Some`, this indicates the output was created in the corresponding block and
351
359
/// may have been spent there. See [`Filter::register_output`] for details.
352
360
///
361
+ /// Depending on your block source, you may need one or both of either [`Self::outpoint`] or
362
+ /// [`Self::script_pubkey`].
363
+ ///
353
364
/// [`ChannelMonitor`]: channelmonitor::ChannelMonitor
354
365
/// [`ChannelMonitor::block_connected`]: channelmonitor::ChannelMonitor::block_connected
355
366
#[ derive( Clone , PartialEq , Eq , Hash ) ]
0 commit comments