From 9cdb5144342bb7892aa74463e2ad9509f767f0bb Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Thu, 30 May 2024 07:38:44 +1000 Subject: [PATCH] Remove odd script hash test This test does an odd combination of function calls, its not obvious what it is supposed to be testing. The `to_p2wsh.is_p2wsh` is already tested above. The leading `to_p2sh` does not prove anything, one can put currently pass any script to `to_p2wsh` so this tests nothing. In preparation for patching the script hashing functionality first remove this odd test. --- bitcoin/src/blockdata/script/tests.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/bitcoin/src/blockdata/script/tests.rs b/bitcoin/src/blockdata/script/tests.rs index 897cac60a..ce51f8458 100644 --- a/bitcoin/src/blockdata/script/tests.rs +++ b/bitcoin/src/blockdata/script/tests.rs @@ -570,7 +570,6 @@ fn p2sh_p2wsh_conversion() { let expected_out = ScriptBuf::from_hex("a914f386c2ba255cc56d20cfa6ea8b062f8b5994551887").unwrap(); assert!(redeem_script.to_p2sh().is_p2sh()); - assert!(redeem_script.to_p2sh().to_p2wsh().is_p2wsh()); assert_eq!(redeem_script.to_p2wsh(), expected_witout); assert_eq!(redeem_script.to_p2wsh().to_p2sh(), expected_out); }