31bdf1ca53c2562836e49cb5721e5a0950f2c070
[rust-lightning] / lightning / src / util / 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 //! Some utility modules live here. See individual sub-modules for more info.
11
12 #[macro_use]
13 pub(crate) mod fuzz_wrappers;
14
15 #[macro_use]
16 pub mod ser_macros;
17
18 pub mod errors;
19 pub mod ser;
20 pub mod message_signing;
21 pub mod invoice;
22 pub mod persist;
23 pub mod scid_utils;
24 pub mod string;
25 pub mod wakers;
26 #[cfg(fuzzing)]
27 pub mod base32;
28 #[cfg(not(fuzzing))]
29 pub(crate) mod base32;
30
31 pub(crate) mod atomic_counter;
32 pub(crate) mod byte_utils;
33 pub(crate) mod transaction_utils;
34 pub(crate) mod time;
35 pub mod hash_tables;
36
37 pub mod indexed_map;
38
39 /// Logging macro utilities.
40 #[macro_use]
41 pub(crate) mod macro_logger;
42
43 // These have to come after macro_logger to build
44 pub mod logger;
45 pub mod config;
46
47 #[cfg(any(test, feature = "_test_utils"))]
48 pub mod test_utils;
49
50 /// impls of traits that add exra enforcement on the way they're called. Useful for detecting state
51 /// machine errors and used in fuzz targets and tests.
52 #[cfg(any(test, feature = "_test_utils"))]
53 pub mod test_channel_signer;
54