@@ -4,12 +4,16 @@ Up until this point, we've explored how to notify LDK of chain activity using
4
4
blocks. But what if you're sourcing chain activity from a place that doesn't
5
5
provide a block-centric interface, like Electrum?
6
6
7
- LDK's ` ChannelManager ` and ` ChainMonitor ` implement a ` chain::Confirm ` interface to support this
8
- use case, analogous to the block-oriented ` chain::Listen ` interface which we've been using up until
9
- now. With this alternative approach, you still need to give LDK information about chain activity,
10
- but only for transactions of interest. To this end, you must call ` Confirm::transactions_confirmed `
11
- when any transactions identified by ` chain::Filter ` 's ` register_tx ` /` register_output ` methods are
12
- confirmed.
7
+ LDK's ` ChannelManager ` and ` ChainMonitor ` implement a
8
+ [ ` chain::Confirm ` ] ( https://docs.rs/lightning/*/lightning/chain/trait.Confirm.html )
9
+ interface to support this use case, analogous to the block-oriented
10
+ [ ` chain::Listen ` ] ( https://docs.rs/lightning/*/lightning/chain/trait.Listen.html )
11
+ interface which we've been using up until now. With this alternative approach,
12
+ you still need to give LDK information about chain activity,
13
+ but only for transactions of interest. To this end, you must call
14
+ ` Confirm::transactions_confirmed ` when any transactions identified by
15
+ [ ` chain::Filter ` ] ( https://docs.rs/lightning/*/lightning/chain/trait.Filter.html ) 's
16
+ ` register_tx ` /` register_output ` methods are confirmed.
13
17
14
18
You also need to notify LDK of any transactions with insufficient confirmations
15
19
that have been reorganized out of the chain. Transactions that need to be monitored for such
@@ -20,6 +24,11 @@ Lastly, you must notify LDK whenever a new chain tip is available using
20
24
the ` Confirm::best_block_updated ` method. See the documentation for a full
21
25
picture of how this interface is intended to be used.
22
26
27
+ ::: tip Note
28
+ Note that the described methods of ` Confirm ` must be called in accordance with the ordering requirements
29
+ described in the [ ` Confirm ` documentation] ( https://docs.rs/lightning/*/lightning/chain/trait.Confirm.html#order )
30
+ :::
31
+
23
32
::: tip Note
24
33
Note that the described methods of ` Confirm ` must be called both on the
25
34
` ChannelManager ` * and* the ` ChainMonitor ` .
0 commit comments