Module breez_sdk_liquid::lightning::chain::chainmonitor
Expand description
Logic to connect off-chain channel management with on-chain transaction monitoring.
ChainMonitor
is an implementation of chain::Watch
used both to process blocks and to
update ChannelMonitor
s accordingly. If any on-chain events need further processing, it will
make those available as MonitorEvent
s to be consumed.
ChainMonitor
is parameterized by an optional chain source, which must implement the
chain::Filter
trait. This provides a mechanism to signal new relevant outputs back to light
clients, such that transactions spending those outputs are included in block data.
ChainMonitor
may be used directly to monitor channels locally or as a part of a distributed
setup to monitor channels remotely. In the latter case, a custom chain::Watch
implementation
would be responsible for routing each update to a remote server and for retrieving monitor
events. The remote server would make use of ChainMonitor
for block processing and for
servicing ChannelMonitor
updates from the client.
Structs§
- An implementation of
chain::Watch
for monitoring channels. - A read-only reference to a current ChannelMonitor.
- An opaque identifier describing a specific
Persist
method call.
Traits§
Persist
defines behavior for persisting channel monitors: this could mean writing once to disk, and/or uploading to one or more backup services.