Replace ChainWatchInterface in NetGraphMsgHandler
[rust-lightning] / ARCH.md
diff --git a/ARCH.md b/ARCH.md
index dba91e7f2bc4444a0809e2136b0316e516107b0d..061c0ba4f8330145f5d965a8550aed8676ef6acb 100644 (file)
--- a/ARCH.md
+++ b/ARCH.md
@@ -11,11 +11,11 @@ receive `ChannelMonitorUpdate`s from `ChannelManager` and persist them to disk b
 channel steps forward.
 
 There are two additional important structures that you may use either on the same device
-as the `ChannelManager` or on a separate one. `Router` handles receiving channel and node
-node announcements and calculates routes for sending payments. `PeerManager` handles the
-authenticated and encrypted communication protocol, monitoring for liveness of peers,
-routing messages to `ChannelManager` and `Router` instances directly, and receiving
-messages from them via the `EventsProvider` interface.
+as the `ChannelManager` or on a separate one. `NetGraphMsgHandler` handles receiving channel
+and node announcements, which are then used to calculate routes by `get_route` for sending payments.
+`PeerManager` handles the authenticated and encrypted communication protocol,
+monitoring for liveness of peers, routing messages to `ChannelManager` and `NetGraphMsgHandler`
+instances directly, and receiving messages from them via the `EventsProvider` interface.
 
 These structs communicate with each other using a public API, so that you can easily add
 a proxy in between for special handling. Further, APIs for key generation, transaction
@@ -48,15 +48,15 @@ At a high level, some of the common interfaces fit together as follows:
  |    (as                      ------------------       ----------------------
  |    ChannelMessageHandler)-> | ChannelManager | ----> | ManyChannelMonitor |
  v               /             ------------------       ----------------------
---------------- /                ^         (as EventsProvider)   ^
-| PeerManager |-                 |              \     /         /
----------------                  |        -------\---/----------
- |              -----------------------  /        \ /
- |              | ChainWatchInterface | -          v
- |              -----------------------        ---------
+--------------- /                          (as EventsProvider)
+| PeerManager |-                                \     /
+---------------                                  \   /
+ |                    -----------------           \ /
+ |                    | chain::Access |            v
+ |                    -----------------        ---------
  |                            |                | Event |
 (as RoutingMessageHandler)    v                ---------
-  \                   ----------
-   -----------------> | Router |
-                      ----------
+  \                   --------------------
+   -----------------> | NetGraphMsgHandler |
+                      --------------------
 ```