From 564682627cb744fa6f88bb66cfa1b92b29642b0d Mon Sep 17 00:00:00 2001 From: Tobin Harding Date: Fri, 25 Feb 2022 08:50:45 +0000 Subject: [PATCH] Remove deprecated conversion method `EcdsaSigHashType::from_u32` was deprecated in v0.26, since we are working on the v0.28 release we can drop this method. --- src/blockdata/transaction.rs | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/blockdata/transaction.rs b/src/blockdata/transaction.rs index b1015f13..70260420 100644 --- a/src/blockdata/transaction.rs +++ b/src/blockdata/transaction.rs @@ -806,12 +806,6 @@ impl EcdsaSigHashType { } } - /// Reads a 4-byte uint32 as a sighash type. - #[deprecated(since = "0.26.1", note = "please use `from_u32_consensus` or `from_u32_standard` instead")] - pub fn from_u32(n: u32) -> EcdsaSigHashType { - Self::from_u32_consensus(n) - } - /// Reads a 4-byte uint32 as a sighash type. /// /// **Note**: this replicates consensus behaviour, for current standardness rules correctness @@ -1190,7 +1184,6 @@ mod tests { fn test_sighashtype_standard() { let nonstandard_hashtype = 0x04; // This type is not well defined, by consensus it becomes ALL - assert_eq!(EcdsaSigHashType::from_u32(nonstandard_hashtype), EcdsaSigHashType::All); assert_eq!(EcdsaSigHashType::from_u32_consensus(nonstandard_hashtype), EcdsaSigHashType::All); // But it's policy-invalid to use it! assert_eq!(EcdsaSigHashType::from_u32_standard(nonstandard_hashtype), Err(NonStandardSigHashType(0x04)));