You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**What it's used for:** ensuring the channel data state is up-to-date with the bitcoin blockchain
190
-
191
-
**Example:** in Rust, of bringing a `ChannelMonitor` up to chain tip: https://github.com/rust-bitcoin/rust-lightning/pull/763/files#diff-f457bab978fc8b89ad308d5195f99d7b65a4a6ba1673c5f164104b2dda9a0db6R251. The `ChannelMonitor` is the `chain_listener` parameter. See the linked function and the `find_fork` function within it.
192
-
193
-
**Implementation notes:** when you read each `ChannelMonitor` off of disk, it comes with a blockhash which was the last block the `ChannelMonitor` saw. If the blockhash is on a fork of the main chain, then first you need to disconnect blocks until the `ChannelMonitor` gets to a common ancestor with the main chain. Then after this disconnection happens if it needs to, you then need to connect recent blocks until the `ChannelMonitor` is at the current chain tip.
194
-
195
194
### Initialize the `ChannelManager`
196
195
**What it's used for:** managing channel state
197
196
@@ -227,6 +226,19 @@ final channel_manager = ((Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ
### Sync `ChannelMonitor`s and `ChannelManager` to chain tip
230
+
**What it's used for:** ensuring the channel data state is up-to-date with the bitcoin blockchain
231
+
232
+
**Example:** in Rust, of bringing a `ChannelMonitor` up to chain tip: https://github.com/rust-bitcoin/rust-lightning/pull/763/files#diff-f457bab978fc8b89ad308d5195f99d7b65a4a6ba1673c5f164104b2dda9a0db6R251. The `ChannelMonitor` is the `chain_listener` parameter. See the linked function and the `find_fork` function within it.
233
+
234
+
**Implementation notes:** when you read each `ChannelMonitor` off of disk, it
235
+
comes with a blockhash which was the last block the `ChannelMonitor` saw. The
236
+
same is true for the `ChannelManager`. If the blockhash is on a fork of the main
237
+
chain, then first you need to disconnect blocks until the `ChannelMonitor` or
238
+
`ChannelManager` gets to a common ancestor with the main chain. Then after this
239
+
disconnection happens if it needs to, you then need to connect recent blocks
240
+
until the `ChannelMonitor` or `ChannelManager` is at the current chain tip.
241
+
230
242
### Give `ChannelMonitor`s to `ChainMonitor`
231
243
** What it's used for:**`ChainMonitor` is responsible for updating the `ChannelMonitor`s during LDK node operation.
0 commit comments