Move router to a separate module
[rust-lightning] / lightning / src / ln / mod.rs
1 //! High level lightning structs and impls live here.
2 //!
3 //! You probably want to create a channelmanager::ChannelManager, and a router::Router first.
4 //! Then, you probably want to pass them both on to a peer_handler::PeerManager and use that to
5 //! create/manage connections and call get_and_clear_pending_events after each action, handling
6 //! them appropriately.
7 //!
8 //! When you want to open/close a channel or send a payment, call into your ChannelManager and when
9 //! you want to learn things about the network topology (eg get a route for sending a payment),
10 //! call into your Router.
11
12 pub mod channelmanager;
13 pub mod channelmonitor;
14 pub mod msgs;
15 pub mod peer_handler;
16 pub mod chan_utils;
17 pub mod features;
18 pub(crate) mod onchaintx;
19
20 #[cfg(feature = "fuzztarget")]
21 pub mod peer_channel_encryptor;
22 #[cfg(not(feature = "fuzztarget"))]
23 pub(crate) mod peer_channel_encryptor;
24
25 mod channel;
26 mod onion_utils;
27 mod wire;
28
29 #[cfg(test)]
30 #[macro_use]
31 pub(crate) mod functional_test_utils;
32 #[cfg(test)]
33 mod functional_tests;
34 #[cfg(test)]
35 mod chanmon_update_fail_tests;
36 #[cfg(test)]
37 mod reorg_tests;