Unblock channels awaiting monitor update based on `ChanMan` queue
[rust-lightning] / lightning / src / ln / mod.rs
1 // This file is Copyright its original authors, visible in version control
2 // history.
3 //
4 // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE
5 // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
6 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
7 // You may not use this file except in accordance with one or both of these
8 // licenses.
9
10 //! Implementations of various parts of the Lightning protocol are in this module.
11
12 #[cfg(any(test, feature = "_test_utils"))]
13 #[macro_use]
14 pub mod functional_test_utils;
15
16 pub mod onion_payment;
17 pub mod channelmanager;
18 pub mod channel_keys;
19 pub mod channel_state;
20 pub mod inbound_payment;
21 pub mod msgs;
22 pub mod peer_handler;
23 pub mod chan_utils;
24 pub mod features;
25 pub mod script;
26 pub mod types;
27
28 pub use types::{ChannelId, PaymentHash, PaymentPreimage, PaymentSecret};
29
30 #[cfg(fuzzing)]
31 pub mod peer_channel_encryptor;
32 #[cfg(not(fuzzing))]
33 pub(crate) mod peer_channel_encryptor;
34
35 #[cfg(fuzzing)]
36 pub mod channel;
37 #[cfg(not(fuzzing))]
38 pub(crate) mod channel;
39
40 pub(crate) mod onion_utils;
41 mod outbound_payment;
42 pub mod wire;
43
44 pub use onion_utils::create_payment_onion;
45 // Older rustc (which we support) refuses to let us call the get_payment_preimage_hash!() macro
46 // without the node parameter being mut. This is incorrect, and thus newer rustcs will complain
47 // about an unnecessary mut. Thus, we silence the unused_mut warning in two test modules below.
48
49 #[cfg(test)]
50 #[allow(unused_mut)]
51 mod blinded_payment_tests;
52 #[cfg(test)]
53 #[allow(unused_mut)]
54 mod functional_tests;
55 #[cfg(test)]
56 #[allow(unused_mut)]
57 mod max_payment_path_len_tests;
58 #[cfg(test)]
59 #[allow(unused_mut)]
60 mod payment_tests;
61 #[cfg(test)]
62 #[allow(unused_mut)]
63 mod priv_short_conf_tests;
64 #[cfg(test)]
65 #[allow(unused_mut)]
66 mod chanmon_update_fail_tests;
67 #[cfg(test)]
68 #[allow(unused_mut)]
69 mod reorg_tests;
70 #[cfg(test)]
71 #[allow(unused_mut)]
72 mod reload_tests;
73 #[cfg(test)]
74 #[allow(unused_mut)]
75 mod onion_route_tests;
76 #[cfg(test)]
77 #[allow(unused_mut)]
78 mod monitor_tests;
79 #[cfg(test)]
80 #[allow(unused_mut)]
81 mod shutdown_tests;
82 #[cfg(all(test, async_signing))]
83 #[allow(unused_mut)]
84 mod async_signer_tests;
85 #[cfg(test)]
86 #[allow(unused_mut)]
87 mod offers_tests;
88 #[allow(dead_code)] // TODO(dual_funding): Exchange for dual_funding cfg
89 pub(crate) mod interactivetxs;
90
91 pub use self::peer_channel_encryptor::LN_MAX_MSG_LEN;