Put test utilities behind a feature flag.
[rust-lightning] / lightning / src / ln / channelmanager.rs
index 379fe19300938127f0602d2c323b532f8604e97c..b43c98c840392c7b983de276e0867ba5e3baf795 100644 (file)
@@ -405,9 +405,9 @@ pub struct ChannelManager<ChanSigner: ChannelKeys, M: Deref, T: Deref, K: Deref,
        last_block_hash: Mutex<BlockHash>,
        secp_ctx: Secp256k1<secp256k1::All>,
 
-       #[cfg(test)]
+       #[cfg(any(test, feature = "_test_utils"))]
        pub(super) channel_state: Mutex<ChannelHolder<ChanSigner>>,
-       #[cfg(not(test))]
+       #[cfg(not(any(test, feature = "_test_utils")))]
        channel_state: Mutex<ChannelHolder<ChanSigner>>,
        our_network_key: SecretKey,