Fix build warning about public_from_secret_hex.
[rust-lightning] / lightning / src / ln / channel.rs
index 4d6e02ccf69e4bdfa3e4fc3136991bae3fe1cdba..db38588230b77e153f967aba6781296fe459967d 100644 (file)
@@ -7405,7 +7405,7 @@ mod tests {
                }
        }
 
-       #[cfg(not(feature = "grind_signatures"))]
+       #[cfg(all(feature = "_test_vectors", not(feature = "grind_signatures")))]
        fn public_from_secret_hex(secp_ctx: &Secp256k1<bitcoin::secp256k1::All>, hex: &str) -> PublicKey {
                PublicKey::from_secret_key(&secp_ctx, &SecretKey::from_slice(&hex::decode(hex).unwrap()[..]).unwrap())
        }