diff --git a/bitcoin/src/crypto/key.rs b/bitcoin/src/crypto/key.rs index 0bac43000..86103e97d 100644 --- a/bitcoin/src/crypto/key.rs +++ b/bitcoin/src/crypto/key.rs @@ -1524,26 +1524,4 @@ mod tests { assert!(res.is_err()); assert_eq!(res.unwrap_err(), ParsePublicKeyError::InvalidChar(103)); } - - #[test] - #[cfg(feature = "std")] - fn private_key_debug_is_obfuscated() { - let sk = - "cVt4o7BGAig1UXywgGSmARhxMdzP5qvQsxKkSsc1XEkw3tDTQFpy".parse::().unwrap(); - let want = - "PrivateKey { compressed: true, network: Test, inner: SecretKey(#32014e414fdce702) }"; - let got = format!("{:?}", sk); - assert_eq!(got, want) - } - - #[test] - #[cfg(not(feature = "std"))] - fn private_key_debug_is_obfuscated() { - let sk = - "cVt4o7BGAig1UXywgGSmARhxMdzP5qvQsxKkSsc1XEkw3tDTQFpy".parse::().unwrap(); - // Why is this not shortened? In rust-secp256k1/src/secret it is printed with "#{:016x}"? - let want = "PrivateKey { compressed: true, network: Test, inner: SecretKey(#7217ac58fbad8880a91032107b82cb6c5422544b426c350ee005cf509f3dbf7b) }"; - let got = format!("{:?}", sk); - assert_eq!(got, want) - } }