@@ -9,8 +9,10 @@ use lightning::chain;
9
9
10
10
/// Returns a validated block header of the source's best chain tip.
11
11
///
12
- /// Upon success, the returned header can be used to initialize [`crate:: SpvClient`]. Useful during a fresh
12
+ /// Upon success, the returned header can be used to initialize [`SpvClient`]. Useful during a fresh
13
13
/// start when there are no chain listeners to sync yet.
14
+ ///
15
+ /// [`SpvClient`]: crate::SpvClient
14
16
pub async fn validate_best_block_header < B : BlockSource > ( block_source : & mut B ) ->
15
17
BlockSourceResult < ValidatedBlockHeader > {
16
18
let ( best_block_hash, best_block_height) = block_source. get_best_block ( ) . await ?;
@@ -22,12 +24,12 @@ BlockSourceResult<ValidatedBlockHeader> {
22
24
/// Performs a one-time sync of chain listeners using a single *trusted* block source, bringing each
23
25
/// listener's view of the chain from its paired block hash to `block_source`'s best chain tip.
24
26
///
25
- /// Upon success, the returned header can be used to initialize [`crate:: SpvClient`]. In the case of
27
+ /// Upon success, the returned header can be used to initialize [`SpvClient`]. In the case of
26
28
/// failure, each listener may be left at a different block hash than the one it was originally
27
29
/// paired with.
28
30
///
29
31
/// Useful during startup to bring the [`ChannelManager`] and each [`ChannelMonitor`] in sync before
30
- /// switching to [`crate:: SpvClient`]. For example:
32
+ /// switching to [`SpvClient`]. For example:
31
33
///
32
34
/// ```
33
35
/// use bitcoin::hash_types::BlockHash;
@@ -113,6 +115,7 @@ BlockSourceResult<ValidatedBlockHeader> {
113
115
/// }
114
116
/// ```
115
117
///
118
+ /// [`SpvClient`]: crate::SpvClient
116
119
/// [`ChannelManager`]: `lightning::ln::channelmanager::ChannelManager`
117
120
/// [`ChannelMonitor`]: `lightning::chain::channelmonitor::ChannelMonitor`
118
121
pub async fn synchronize_listeners < B : BlockSource , C : Cache > (
0 commit comments