File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,20 @@ use bitcoincore_rpc;
13
13
use bitcoincore_rpc:: { json:: GetBlockHeaderResult , RpcApi } ;
14
14
15
15
/// Type that returns Bitcoin blocks by matching a list of script pubkeys (SPKs) against a
16
- /// [`bip158::BlockFilter`].
16
+ /// [`bip158::BlockFilter`](bitcoin::bip158::BlockFilter).
17
+ ///
18
+ /// * `FilterIter` talks to bitcoind via JSON-RPC interface, which is handled by the
19
+ /// [`bitcoincore_rpc::Client`].
20
+ /// * Collect the script pubkeys (SPKs) you want to watch. These will usually correspond to wallet
21
+ /// addresses that have been handed out for receiving payments.
22
+ /// * Construct `FilterIter` with the RPC client, SPKs, and [`CheckPoint`]. The checkpoint tip
23
+ /// informs `FilterIter` of the height to begin scanning from. An error is thrown if `FilterIter`
24
+ /// is unable to find a common ancestor with the remote node.
25
+ /// * Scan blocks by calling `next` in a loop and processing the [`Event`]s. If a filter matched any
26
+ /// of the watched scripts, then the relevant [`Block`] is returned. Note that false positives may
27
+ /// occur. `FilterIter` will continue to yield events until it reaches the latest chain tip.
28
+ /// Events contain the updated checkpoint `cp` which may be incorporated into the local chain
29
+ /// state to stay in sync with the tip.
17
30
#[ derive( Debug ) ]
18
31
pub struct FilterIter < ' a > {
19
32
/// RPC client
You can’t perform that action at this time.
0 commit comments