Expose test_utils to fuzztarget (in addition to _test_utils feature)
authorMatt Corallo <git@bluematt.me>
Wed, 25 Nov 2020 22:50:38 +0000 (17:50 -0500)
committerMatt Corallo <git@bluematt.me>
Mon, 4 Jan 2021 17:40:40 +0000 (12:40 -0500)
lightning/Cargo.toml
lightning/src/chain/channelmonitor.rs
lightning/src/lib.rs
lightning/src/util/mod.rs

index 2d7d95dd8fadde57328f87c04c89e10a6622833e..016399f882f438a0fd56eaa095c44dccb0d75847 100644 (file)
@@ -11,7 +11,7 @@ Still missing tons of error-handling. See GitHub issues for suggested projects i
 """
 
 [features]
-fuzztarget = ["bitcoin/fuzztarget"]
+fuzztarget = ["bitcoin/fuzztarget", "regex"]
 # Internal test utilities exposed to other repo crates
 _test_utils = ["hex", "regex"]
 # Unlog messages superior at targeted level.
index 5278376126228bcc467a80278c61128e44bc1013..fe03375c9c8d5dfd6ab5a1fedbdbeb8cc847083d 100644 (file)
@@ -56,7 +56,7 @@ use std::io::Error;
 
 /// An update generated by the underlying Channel itself which contains some new information the
 /// ChannelMonitor should be made aware of.
-#[cfg_attr(any(test, feature = "_test_utils"), derive(PartialEq))]
+#[cfg_attr(any(test, feature = "fuzztarget", feature = "_test_utils"), derive(PartialEq))]
 #[derive(Clone)]
 #[must_use]
 pub struct ChannelMonitorUpdate {
@@ -485,7 +485,7 @@ enum OnchainEvent {
 const SERIALIZATION_VERSION: u8 = 1;
 const MIN_SERIALIZATION_VERSION: u8 = 1;
 
-#[cfg_attr(any(test, feature = "_test_utils"), derive(PartialEq))]
+#[cfg_attr(any(test, feature = "fuzztarget", feature = "_test_utils"), derive(PartialEq))]
 #[derive(Clone)]
 pub(crate) enum ChannelMonitorUpdateStep {
        LatestHolderCommitmentTXInfo {
index c5d369268cc6836f462ddb69d4c1b58c2a2047c5..e466205c97c83a9ad854c6aad71d52db6817848c 100644 (file)
@@ -29,7 +29,7 @@
 
 extern crate bitcoin;
 #[cfg(any(test, feature = "_test_utils"))] extern crate hex;
-#[cfg(any(test, feature = "_test_utils"))] extern crate regex;
+#[cfg(any(test, feature = "fuzztarget", feature = "_test_utils"))] extern crate regex;
 
 #[macro_use]
 pub mod util;
index a3cfaa9804e6e9f58c3521e6ab2d07c3862fd0b6..57b5f2d7420cd6e0fdf72b9b770684b1f6bab846 100644 (file)
@@ -32,7 +32,7 @@ pub(crate) mod macro_logger;
 pub mod logger;
 pub mod config;
 
-#[cfg(any(test, feature = "_test_utils"))]
+#[cfg(any(test, feature = "fuzztarget", feature = "_test_utils"))]
 pub mod test_utils;
 
 /// impls of traits that add exra enforcement on the way they're called. Useful for detecting state