Skip to content

Commit fba204b

Browse files
authored
Merge pull request #848 from TheBlueMatt/2021-03-doc-cleanups
Clean up doc links and enforce them in CI
2 parents 32f6205 + e447131 commit fba204b

File tree

19 files changed

+95
-110
lines changed

19 files changed

+95
-110
lines changed

background-processor/src/lib.rs

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
//! Utilities that take care of tasks that (1) need to happen periodically to keep Rust-Lightning
2+
//! running properly, and (2) either can or should be run in the background. See docs for
3+
//! [`BackgroundProcessor`] for more details on the nitty-gritty.
4+
5+
#![deny(broken_intra_doc_links)]
6+
#![deny(missing_docs)]
7+
#![deny(unsafe_code)]
8+
19
#[macro_use] extern crate lightning;
210

311
use lightning::chain;
@@ -40,18 +48,21 @@ impl BackgroundProcessor {
4048
/// Start a background thread that takes care of responsibilities enumerated in the top-level
4149
/// documentation.
4250
///
43-
/// If `persist_manager` returns an error, then this thread will return said error (and `start()`
44-
/// will need to be called again to restart the `BackgroundProcessor`). Users should wait on
45-
/// [`thread_handle`]'s `join()` method to be able to tell if and when an error is returned, or
46-
/// implement `persist_manager` such that an error is never returned to the `BackgroundProcessor`
51+
/// If `persist_manager` returns an error, then this thread will return said error (and
52+
/// `start()` will need to be called again to restart the `BackgroundProcessor`). Users should
53+
/// wait on [`thread_handle`]'s `join()` method to be able to tell if and when an error is
54+
/// returned, or implement `persist_manager` such that an error is never returned to the
55+
/// `BackgroundProcessor`
4756
///
48-
/// `persist_manager` is responsible for writing out the `ChannelManager` to disk, and/or uploading
49-
/// to one or more backup services. See [`ChannelManager::write`] for writing out a `ChannelManager`.
50-
/// See [`FilesystemPersister::persist_manager`] for Rust-Lightning's provided implementation.
57+
/// `persist_manager` is responsible for writing out the [`ChannelManager`] to disk, and/or
58+
/// uploading to one or more backup services. See [`ChannelManager::write`] for writing out a
59+
/// [`ChannelManager`]. See [`FilesystemPersister::persist_manager`] for Rust-Lightning's
60+
/// provided implementation.
5161
///
52-
/// [`thread_handle`]: struct.BackgroundProcessor.html#structfield.thread_handle
53-
/// [`ChannelManager::write`]: ../lightning/ln/channelmanager/struct.ChannelManager.html#method.write
54-
/// [`FilesystemPersister::persist_manager`]: ../lightning_persister/struct.FilesystemPersister.html#impl
62+
/// [`thread_handle`]: BackgroundProcessor::thread_handle
63+
/// [`ChannelManager`]: lightning::ln::channelmanager::ChannelManager
64+
/// [`ChannelManager::write`]: lightning::ln::channelmanager::ChannelManager#impl-Writeable
65+
/// [`FilesystemPersister::persist_manager`]: lightning_persister::FilesystemPersister::persist_manager
5566
pub fn start<PM, Signer, M, T, K, F, L>(persist_manager: PM, manager: Arc<ChannelManager<Signer, Arc<M>, Arc<T>, Arc<K>, Arc<F>, Arc<L>>>, logger: Arc<L>) -> Self
5667
where Signer: 'static + Sign,
5768
M: 'static + chain::Watch<Signer>,

ci/check-compiles.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@ set -e
33
set -x
44
echo Testing $(git log -1 --oneline)
55
cargo check
6+
cargo doc
7+
cargo doc --document-private-items
68
cd fuzz && cargo check --features=stdin_fuzz

lightning-block-sync/src/http.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
//! Simple HTTP implementation which supports both async and traditional execution environments
2+
//! with minimal dependencies. This is used as the basis for REST and RPC clients.
3+
14
use chunked_transfer;
25
use serde_json;
36

lightning-block-sync/src/init.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
//! Utilities to assist in the initial sync required to initialize or reload Rust-Lightning objects
2+
//! from disk.
3+
14
use crate::{BlockSource, BlockSourceResult, Cache, ChainNotifier};
25
use crate::poll::{ChainPoller, Validate, ValidatedBlockHeader};
36

@@ -11,6 +14,8 @@ use lightning::chain;
1114
///
1215
/// Upon success, the returned header can be used to initialize [`SpvClient`]. Useful during a fresh
1316
/// start when there are no chain listeners to sync yet.
17+
///
18+
/// [`SpvClient`]: crate::SpvClient
1419
pub async fn validate_best_block_header<B: BlockSource>(block_source: &mut B) ->
1520
BlockSourceResult<ValidatedBlockHeader> {
1621
let (best_block_hash, best_block_height) = block_source.get_best_block().await?;
@@ -113,9 +118,9 @@ BlockSourceResult<ValidatedBlockHeader> {
113118
/// }
114119
/// ```
115120
///
116-
/// [`SpvClient`]: ../struct.SpvClient.html
117-
/// [`ChannelManager`]: ../../lightning/ln/channelmanager/struct.ChannelManager.html
118-
/// [`ChannelMonitor`]: ../../lightning/chain/channelmonitor/struct.ChannelMonitor.html
121+
/// [`SpvClient`]: crate::SpvClient
122+
/// [`ChannelManager`]: lightning::ln::channelmanager::ChannelManager
123+
/// [`ChannelMonitor`]: lightning::chain::channelmonitor::ChannelMonitor
119124
pub async fn synchronize_listeners<B: BlockSource, C: Cache>(
120125
block_source: &mut B,
121126
network: Network,

lightning-block-sync/src/lib.rs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@
1212
//!
1313
//! Both features support either blocking I/O using `std::net::TcpStream` or, with feature `tokio`,
1414
//! non-blocking I/O using `tokio::net::TcpStream` from inside a Tokio runtime.
15-
//!
16-
//! [`SpvClient`]: struct.SpvClient.html
17-
//! [`BlockSource`]: trait.BlockSource.html
15+
16+
#![deny(broken_intra_doc_links)]
17+
#![deny(missing_docs)]
18+
#![deny(unsafe_code)]
1819

1920
#[cfg(any(feature = "rest-client", feature = "rpc-client"))]
2021
pub mod http;
@@ -69,8 +70,7 @@ pub trait BlockSource : Sync + Send {
6970
/// When polling a block source, [`Poll`] implementations may pass the height to [`get_header`]
7071
/// to allow for a more efficient lookup.
7172
///
72-
/// [`Poll`]: poll/trait.Poll.html
73-
/// [`get_header`]: #tymethod.get_header
73+
/// [`get_header`]: Self::get_header
7474
fn get_best_block<'a>(&'a mut self) -> AsyncBlockSourceResult<(BlockHash, Option<u32>)>;
7575
}
7676

@@ -176,8 +176,6 @@ where L::Target: chain::Listen {
176176
/// Implementations may define how long to retain headers such that it's unlikely they will ever be
177177
/// needed to disconnect a block. In cases where block sources provide access to headers on stale
178178
/// forks reliably, caches may be entirely unnecessary.
179-
///
180-
/// [`ChainNotifier`]: struct.ChainNotifier.html
181179
pub trait Cache {
182180
/// Retrieves the block header keyed by the given block hash.
183181
fn look_up(&self, block_hash: &BlockHash) -> Option<&ValidatedBlockHeader>;
@@ -218,7 +216,7 @@ impl<'a, P: Poll, C: Cache, L: Deref> SpvClient<'a, P, C, L> where L::Target: ch
218216
/// * `header_cache` is used to look up and store headers on the best chain
219217
/// * `chain_listener` is notified of any blocks connected or disconnected
220218
///
221-
/// [`poll_best_tip`]: struct.SpvClient.html#method.poll_best_tip
219+
/// [`poll_best_tip`]: SpvClient::poll_best_tip
222220
pub fn new(
223221
chain_tip: ValidatedBlockHeader,
224222
chain_poller: P,
@@ -273,7 +271,7 @@ impl<'a, P: Poll, C: Cache, L: Deref> SpvClient<'a, P, C, L> where L::Target: ch
273271

274272
/// Notifies [listeners] of blocks that have been connected or disconnected from the chain.
275273
///
276-
/// [listeners]: ../../lightning/chain/trait.Listen.html
274+
/// [listeners]: lightning::chain::Listen
277275
pub struct ChainNotifier<'a, C: Cache, L: Deref> where L::Target: chain::Listen {
278276
/// Cache for looking up headers before fetching from a block source.
279277
header_cache: &'a mut C,

lightning-block-sync/src/poll.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Adapters that make one or more [`BlockSource`]s simpler to poll for new chain tip transitions.
2+
13
use crate::{AsyncBlockSourceResult, BlockHeaderData, BlockSource, BlockSourceError, BlockSourceResult};
24

35
use bitcoin::blockdata::block::Block;

lightning-block-sync/src/rest.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
//! Simple REST client implementation which implements [`BlockSource`] against a Bitcoin Core REST
2+
//! endpoint.
3+
14
use crate::{BlockHeaderData, BlockSource, AsyncBlockSourceResult};
25
use crate::http::{BinaryResponse, HttpEndpoint, HttpClient, JsonResponse};
36

lightning-block-sync/src/rpc.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
//! Simple RPC client implementation which implements [`BlockSource`] against a Bitcoin Core RPC
2+
//! endpoint.
3+
14
use crate::{BlockHeaderData, BlockSource, AsyncBlockSourceResult};
25
use crate::http::{HttpClient, HttpEndpoint, JsonResponse};
36

lightning-net-tokio/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@
7272
//! }
7373
//! ```
7474
75+
#![deny(broken_intra_doc_links)]
76+
#![deny(missing_docs)]
77+
7578
use bitcoin::secp256k1::key::PublicKey;
7679

7780
use tokio::net::TcpStream;

lightning-persister/src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
//! Utilities that handle persisting Rust-Lightning data to disk via standard filesystem APIs.
2+
3+
#![deny(broken_intra_doc_links)]
4+
#![deny(missing_docs)]
5+
16
mod util;
27

38
extern crate lightning;
@@ -72,6 +77,7 @@ impl FilesystemPersister {
7277
}
7378
}
7479

80+
/// Get the directory which was provided when this persister was initialized.
7581
pub fn get_data_dir(&self) -> String {
7682
self.path_to_channel_data.clone()
7783
}

lightning/src/chain/chainmonitor.rs

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,15 @@
1313
//! update [`ChannelMonitor`]s accordingly. If any on-chain events need further processing, it will
1414
//! make those available as [`MonitorEvent`]s to be consumed.
1515
//!
16-
//! `ChainMonitor` is parameterized by an optional chain source, which must implement the
16+
//! [`ChainMonitor`] is parameterized by an optional chain source, which must implement the
1717
//! [`chain::Filter`] trait. This provides a mechanism to signal new relevant outputs back to light
1818
//! clients, such that transactions spending those outputs are included in block data.
1919
//!
20-
//! `ChainMonitor` may be used directly to monitor channels locally or as a part of a distributed
21-
//! setup to monitor channels remotely. In the latter case, a custom `chain::Watch` implementation
20+
//! [`ChainMonitor`] may be used directly to monitor channels locally or as a part of a distributed
21+
//! setup to monitor channels remotely. In the latter case, a custom [`chain::Watch`] implementation
2222
//! would be responsible for routing each update to a remote server and for retrieving monitor
23-
//! events. The remote server would make use of `ChainMonitor` for block processing and for
24-
//! servicing `ChannelMonitor` updates from the client.
25-
//!
26-
//! [`ChainMonitor`]: struct.ChainMonitor.html
27-
//! [`chain::Filter`]: ../trait.Filter.html
28-
//! [`chain::Watch`]: ../trait.Watch.html
29-
//! [`ChannelMonitor`]: ../channelmonitor/struct.ChannelMonitor.html
30-
//! [`MonitorEvent`]: ../channelmonitor/enum.MonitorEvent.html
23+
//! events. The remote server would make use of [`ChainMonitor`] for block processing and for
24+
//! servicing [`ChannelMonitor`] updates from the client.
3125
3226
use bitcoin::blockdata::block::{Block, BlockHeader};
3327

@@ -53,9 +47,8 @@ use std::ops::Deref;
5347
/// or used independently to monitor channels remotely. See the [module-level documentation] for
5448
/// details.
5549
///
56-
/// [`chain::Watch`]: ../trait.Watch.html
57-
/// [`ChannelManager`]: ../../ln/channelmanager/struct.ChannelManager.html
58-
/// [module-level documentation]: index.html
50+
/// [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
51+
/// [module-level documentation]: crate::chain::chainmonitor
5952
pub struct ChainMonitor<ChannelSigner: Sign, C: Deref, T: Deref, F: Deref, L: Deref, P: Deref>
6053
where C::Target: chain::Filter,
6154
T::Target: BroadcasterInterface,
@@ -88,10 +81,6 @@ where C::Target: chain::Filter,
8881
/// calls must not exclude any transactions matching the new outputs nor any in-block
8982
/// descendants of such transactions. It is not necessary to re-fetch the block to obtain
9083
/// updated `txdata`.
91-
///
92-
/// [`ChannelMonitor::block_connected`]: ../channelmonitor/struct.ChannelMonitor.html#method.block_connected
93-
/// [`chain::Watch::release_pending_monitor_events`]: ../trait.Watch.html#tymethod.release_pending_monitor_events
94-
/// [`chain::Filter`]: ../trait.Filter.html
9584
pub fn block_connected(&self, header: &BlockHeader, txdata: &TransactionData, height: u32) {
9685
let monitors = self.monitors.read().unwrap();
9786
for monitor in monitors.values() {
@@ -110,8 +99,6 @@ where C::Target: chain::Filter,
11099
/// Dispatches to per-channel monitors, which are responsible for updating their on-chain view
111100
/// of a channel based on the disconnected block. See [`ChannelMonitor::block_disconnected`] for
112101
/// details.
113-
///
114-
/// [`ChannelMonitor::block_disconnected`]: ../channelmonitor/struct.ChannelMonitor.html#method.block_disconnected
115102
pub fn block_disconnected(&self, header: &BlockHeader, disconnected_height: u32) {
116103
let monitors = self.monitors.read().unwrap();
117104
for monitor in monitors.values() {
@@ -126,8 +113,6 @@ where C::Target: chain::Filter,
126113
/// pre-filter blocks or only fetch blocks matching a compact filter. Otherwise, clients may
127114
/// always need to fetch full blocks absent another means for determining which blocks contain
128115
/// transactions relevant to the watched channels.
129-
///
130-
/// [`chain::Filter`]: ../trait.Filter.html
131116
pub fn new(chain_source: Option<C>, broadcaster: T, logger: L, feeest: F, persister: P) -> Self {
132117
Self {
133118
monitors: RwLock::new(HashMap::new()),
@@ -174,8 +159,6 @@ where C::Target: chain::Filter,
174159
///
175160
/// Note that we persist the given `ChannelMonitor` while holding the `ChainMonitor`
176161
/// monitors lock.
177-
///
178-
/// [`chain::Filter`]: ../trait.Filter.html
179162
fn watch_channel(&self, funding_outpoint: OutPoint, monitor: ChannelMonitor<ChannelSigner>) -> Result<(), ChannelMonitorUpdateErr> {
180163
let mut monitors = self.monitors.write().unwrap();
181164
let entry = match monitors.entry(funding_outpoint) {

lightning/src/chain/channelmonitor.rs

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
//! ChannelMonitors should do so). Thus, if you're building rust-lightning into an HSM or other
2020
//! security-domain-separated system design, you should consider having multiple paths for
2121
//! ChannelMonitors to get out of the HSM and onto monitoring devices.
22-
//!
23-
//! [`chain::Watch`]: ../trait.Watch.html
2422
2523
use bitcoin::blockdata::block::{Block, BlockHeader};
2624
use bitcoin::blockdata::transaction::{TxOut,Transaction};
@@ -75,8 +73,6 @@ pub struct ChannelMonitorUpdate {
7573
/// The only instance where update_id values are not strictly increasing is the case where we
7674
/// allow post-force-close updates with a special update ID of [`CLOSED_CHANNEL_UPDATE_ID`]. See
7775
/// its docs for more details.
78-
///
79-
/// [`CLOSED_CHANNEL_UPDATE_ID`]: constant.CLOSED_CHANNEL_UPDATE_ID.html
8076
pub update_id: u64,
8177
}
8278

@@ -193,8 +189,6 @@ pub enum MonitorEvent {
193189
/// Simple structure sent back by `chain::Watch` when an HTLC from a forward channel is detected on
194190
/// chain. Used to update the corresponding HTLC in the backward channel. Failing to pass the
195191
/// preimage claim backward will lead to loss of funds.
196-
///
197-
/// [`chain::Watch`]: ../trait.Watch.html
198192
#[derive(Clone, PartialEq)]
199193
pub struct HTLCUpdate {
200194
pub(crate) payment_hash: PaymentHash,
@@ -1187,8 +1181,6 @@ impl<Signer: Sign> ChannelMonitor<Signer> {
11871181

11881182
/// Get the list of HTLCs who's status has been updated on chain. This should be called by
11891183
/// ChannelManager via [`chain::Watch::release_pending_monitor_events`].
1190-
///
1191-
/// [`chain::Watch::release_pending_monitor_events`]: ../trait.Watch.html#tymethod.release_pending_monitor_events
11921184
pub fn get_and_clear_pending_monitor_events(&self) -> Vec<MonitorEvent> {
11931185
self.inner.lock().unwrap().get_and_clear_pending_monitor_events()
11941186
}
@@ -2450,11 +2442,8 @@ pub trait Persist<ChannelSigner: Sign>: Send + Sync {
24502442
/// stored channel data). Note that you **must** persist every new monitor to
24512443
/// disk. See the `Persist` trait documentation for more details.
24522444
///
2453-
/// See [`ChannelMonitor::serialize_for_disk`] for writing out a `ChannelMonitor`,
2445+
/// See [`ChannelMonitor::write`] for writing out a `ChannelMonitor`,
24542446
/// and [`ChannelMonitorUpdateErr`] for requirements when returning errors.
2455-
///
2456-
/// [`ChannelMonitor::serialize_for_disk`]: struct.ChannelMonitor.html#method.serialize_for_disk
2457-
/// [`ChannelMonitorUpdateErr`]: enum.ChannelMonitorUpdateErr.html
24582447
fn persist_new_channel(&self, id: OutPoint, data: &ChannelMonitor<ChannelSigner>) -> Result<(), ChannelMonitorUpdateErr>;
24592448

24602449
/// Update one channel's data. The provided `ChannelMonitor` has already
@@ -2476,14 +2465,9 @@ pub trait Persist<ChannelSigner: Sign>: Send + Sync {
24762465
/// them in batches. The size of each monitor grows `O(number of state updates)`
24772466
/// whereas updates are small and `O(1)`.
24782467
///
2479-
/// See [`ChannelMonitor::serialize_for_disk`] for writing out a `ChannelMonitor`,
2468+
/// See [`ChannelMonitor::write`] for writing out a `ChannelMonitor`,
24802469
/// [`ChannelMonitorUpdate::write`] for writing out an update, and
24812470
/// [`ChannelMonitorUpdateErr`] for requirements when returning errors.
2482-
///
2483-
/// [`ChannelMonitor::update_monitor`]: struct.ChannelMonitor.html#impl-1
2484-
/// [`ChannelMonitor::serialize_for_disk`]: struct.ChannelMonitor.html#method.serialize_for_disk
2485-
/// [`ChannelMonitorUpdate::write`]: struct.ChannelMonitorUpdate.html#method.write
2486-
/// [`ChannelMonitorUpdateErr`]: enum.ChannelMonitorUpdateErr.html
24872471
fn update_persisted_channel(&self, id: OutPoint, update: &ChannelMonitorUpdate, data: &ChannelMonitor<ChannelSigner>) -> Result<(), ChannelMonitorUpdateErr>;
24882472
}
24892473

lightning/src/chain/mod.rs

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ pub mod transaction;
2525
pub mod keysinterface;
2626

2727
/// An error when accessing the chain via [`Access`].
28-
///
29-
/// [`Access`]: trait.Access.html
3028
#[derive(Clone)]
3129
pub enum AccessError {
3230
/// The requested chain is unknown.
@@ -77,28 +75,28 @@ pub trait Listen {
7775
/// funds in the channel. See [`ChannelMonitorUpdateErr`] for more details about how to handle
7876
/// multiple instances.
7977
///
80-
/// [`ChannelMonitor`]: channelmonitor/struct.ChannelMonitor.html
81-
/// [`ChannelMonitorUpdateErr`]: channelmonitor/enum.ChannelMonitorUpdateErr.html
82-
/// [`PermanentFailure`]: channelmonitor/enum.ChannelMonitorUpdateErr.html#variant.PermanentFailure
78+
/// [`ChannelMonitor`]: channelmonitor::ChannelMonitor
79+
/// [`ChannelMonitorUpdateErr`]: channelmonitor::ChannelMonitorUpdateErr
80+
/// [`PermanentFailure`]: channelmonitor::ChannelMonitorUpdateErr::PermanentFailure
8381
pub trait Watch<ChannelSigner: Sign>: Send + Sync {
8482
/// Watches a channel identified by `funding_txo` using `monitor`.
8583
///
8684
/// Implementations are responsible for watching the chain for the funding transaction along
8785
/// with any spends of outputs returned by [`get_outputs_to_watch`]. In practice, this means
8886
/// calling [`block_connected`] and [`block_disconnected`] on the monitor.
8987
///
90-
/// [`get_outputs_to_watch`]: channelmonitor/struct.ChannelMonitor.html#method.get_outputs_to_watch
91-
/// [`block_connected`]: channelmonitor/struct.ChannelMonitor.html#method.block_connected
92-
/// [`block_disconnected`]: channelmonitor/struct.ChannelMonitor.html#method.block_disconnected
88+
/// [`get_outputs_to_watch`]: channelmonitor::ChannelMonitor::get_outputs_to_watch
89+
/// [`block_connected`]: channelmonitor::ChannelMonitor::block_connected
90+
/// [`block_disconnected`]: channelmonitor::ChannelMonitor::block_disconnected
9391
fn watch_channel(&self, funding_txo: OutPoint, monitor: ChannelMonitor<ChannelSigner>) -> Result<(), ChannelMonitorUpdateErr>;
9492

9593
/// Updates a channel identified by `funding_txo` by applying `update` to its monitor.
9694
///
9795
/// Implementations must call [`update_monitor`] with the given update. See
9896
/// [`ChannelMonitorUpdateErr`] for invariants around returning an error.
9997
///
100-
/// [`update_monitor`]: channelmonitor/struct.ChannelMonitor.html#method.update_monitor
101-
/// [`ChannelMonitorUpdateErr`]: channelmonitor/enum.ChannelMonitorUpdateErr.html
98+
/// [`update_monitor`]: channelmonitor::ChannelMonitor::update_monitor
99+
/// [`ChannelMonitorUpdateErr`]: channelmonitor::ChannelMonitorUpdateErr
102100
fn update_channel(&self, funding_txo: OutPoint, update: ChannelMonitorUpdate) -> Result<(), ChannelMonitorUpdateErr>;
103101

104102
/// Returns any monitor events since the last call. Subsequent calls must only return new
@@ -120,11 +118,10 @@ pub trait Watch<ChannelSigner: Sign>: Send + Sync {
120118
///
121119
/// Note that use as part of a [`Watch`] implementation involves reentrancy. Therefore, the `Filter`
122120
/// should not block on I/O. Implementations should instead queue the newly monitored data to be
123-
/// processed later. Then, in order to block until the data has been processed, any `Watch`
121+
/// processed later. Then, in order to block until the data has been processed, any [`Watch`]
124122
/// invocation that has called the `Filter` must return [`TemporaryFailure`].
125123
///
126-
/// [`Watch`]: trait.Watch.html
127-
/// [`TemporaryFailure`]: channelmonitor/enum.ChannelMonitorUpdateErr.html#variant.TemporaryFailure
124+
/// [`TemporaryFailure`]: channelmonitor::ChannelMonitorUpdateErr::TemporaryFailure
128125
/// [BIP 157]: https://github.com/bitcoin/bips/blob/master/bip-0157.mediawiki
129126
/// [BIP 158]: https://github.com/bitcoin/bips/blob/master/bip-0158.mediawiki
130127
pub trait Filter: Send + Sync {

0 commit comments

Comments
 (0)