Skip to content

Commit d36e817

Browse files
authored
Mention ordering requirements
... and link docs.
1 parent 2d05394 commit d36e817

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

docs/blockchain_data/confirmed_transactions.md

+15-6
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,16 @@ Up until this point, we've explored how to notify LDK of chain activity using
44
blocks. But what if you're sourcing chain activity from a place that doesn't
55
provide a block-centric interface, like Electrum?
66

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.
1317

1418
You also need to notify LDK of any transactions with insufficient confirmations
1519
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
2024
the `Confirm::best_block_updated` method. See the documentation for a full
2125
picture of how this interface is intended to be used.
2226

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+
2332
::: tip Note
2433
Note that the described methods of `Confirm` must be called both on the
2534
`ChannelManager` *and* the `ChainMonitor`.

0 commit comments

Comments
 (0)