Merge pull request #938 from lightning-signer/2020-06-test-background
[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 pub mod events;
16 pub mod errors;
17 pub mod ser;
18 pub mod message_signing;
19
20 pub(crate) mod byte_utils;
21 pub(crate) mod chacha20;
22 #[cfg(feature = "fuzztarget")]
23 pub mod zbase32;
24 #[cfg(not(feature = "fuzztarget"))]
25 pub(crate) mod zbase32;
26 #[cfg(not(feature = "fuzztarget"))]
27 pub(crate) mod poly1305;
28 pub(crate) mod chacha20poly1305rfc;
29 pub(crate) mod transaction_utils;
30 pub(crate) mod scid_utils;
31
32 #[macro_use]
33 pub(crate) mod ser_macros;
34
35 /// Logging macro utilities.
36 #[macro_use]
37 pub(crate) mod macro_logger;
38
39 // These have to come after macro_logger to build
40 pub mod logger;
41 pub mod config;
42
43 #[cfg(any(test, feature = "fuzztarget", feature = "_test_utils"))]
44 pub mod test_utils;
45
46 /// impls of traits that add exra enforcement on the way they're called. Useful for detecting state
47 /// machine errors and used in fuzz targets and tests.
48 #[cfg(any(test, feature = "fuzztarget", feature = "_test_utils"))]
49 pub mod enforcing_trait_impls;