X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ARCH.md;h=1d987a3531457d78e92def84c536922a2a8c7ce5;hb=801b775a7d17eff165ea5e8a4d11a966e0ef29d0;hp=c4f94280c4890c8a5064339ab8b553fb735f93b0;hpb=b5723c7d4837a26156ac22672e62aa2c955b95ba;p=rust-lightning diff --git a/ARCH.md b/ARCH.md index c4f94280..1d987a35 100644 --- a/ARCH.md +++ b/ARCH.md @@ -6,7 +6,7 @@ need to use are `ChannelManager` and `ChannelMonitor`. `ChannelManager` holds mu channels, routes payments between them, and exposes a simple API to make and receive payments. Individual `ChannelMonitor`s monitor the on-chain state of a channel, punish counterparties if they misbehave, and force-close channels if they contain unresolved -HTLCs which are near expiration. The `ManyChannelMonitor` API provides a way for you to +HTLCs which are near expiration. The `chain::Watch` interface provides a way for you to receive `ChannelMonitorUpdate`s from `ChannelManager` and persist them to disk before the channel steps forward. @@ -45,15 +45,15 @@ At a high level, some of the common interfaces fit together as follows: | \ | | / ---------> | BroadcasterInterface | | \ | | / / | ------------------------ | \ v v v / v ^ - | (as ------------------ ---------------------- - | ChannelMessageHandler)-> | ChannelManager | ----> | ManyChannelMonitor | - v / ------------------ ---------------------- ---------------- / ^ (as EventsProvider) ^ -| PeerManager |- | \ / / ---------------- | -------\---/---------- - | ----------------------- / \ / - | | ChainWatchInterface | - v - | ----------------------- --------- + | (as ------------------ ---------------- + | ChannelMessageHandler)-> | ChannelManager | ----> | chain::Watch | + v / ------------------ ---------------- +--------------- / (as EventsProvider) +| PeerManager |- \ / +--------------- \ / + | ----------------- \ / + | | chain::Access | v + | ----------------- --------- | | | Event | (as RoutingMessageHandler) v --------- \ --------------------