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.
This commit is contained in:
Tobin Harding 2022-02-25 08:50:45 +00:00
parent d1753d7ff1
commit 564682627c
1 changed files with 0 additions and 7 deletions

View File

@ -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)));