Skip to content

Commit 2c9233e

Browse files
committed
f - Rewrite WatchedOutput docs to be less vague
1 parent 217ae71 commit 2c9233e

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

lightning/src/chain/mod.rs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ pub trait Filter: Send + Sync {
132132
/// Registers interest in spends of a transaction output.
133133
///
134134
/// Optionally, when `output.block_hash` is set, should return any transaction spending the
135-
/// output that is found in the corresponding block at the given index.
135+
/// output that is found in the corresponding block along with its index.
136136
///
137137
/// This return value is useful for Electrum clients in order to supply in-block descendant
138138
/// transactions which otherwise were not included. This is not necessary for other clients if
@@ -143,13 +143,17 @@ pub trait Filter: Send + Sync {
143143

144144
/// A transaction output watched by a [`ChannelMonitor`] for spends on-chain.
145145
///
146-
/// Used to convey to a [`Filter`] an output identified by `outpoint` having `script_pubkey` as the
147-
/// spending condition. If `block_hash` is `Some`, this indicates the output may have been spent in
148-
/// the corresponding block.
146+
/// Used to convey to a [`Filter`] such an output with a given spending condition. Any transaction
147+
/// spending the output must be given to [`ChannelMonitor::block_connected`] either directly or via
148+
/// the return value of [`Filter::register_output`].
149149
///
150-
/// [`ChannelMonitor`]: channelmonitor/struct.ChannelMonitor.html
150+
/// If `block_hash` is `Some`, this indicates the output was created in the corresponding block and
151+
/// may have been spent there. See [`Filter::register_output`] for details.
152+
///
153+
/// [`ChannelMonitor`]: channelmonitor::ChannelMonitor
154+
/// [`ChannelMonitor::block_connected`]: channelmonitor::ChannelMonitor::block_connected
151155
pub struct WatchedOutput {
152-
/// Block where the transaction output may have been spent.
156+
/// First block where the transaction output may have been spent.
153157
pub block_hash: Option<BlockHash>,
154158

155159
/// Outpoint identifying the transaction output.

0 commit comments

Comments
 (0)