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:
parent
d1753d7ff1
commit
564682627c
|
@ -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.
|
/// Reads a 4-byte uint32 as a sighash type.
|
||||||
///
|
///
|
||||||
/// **Note**: this replicates consensus behaviour, for current standardness rules correctness
|
/// **Note**: this replicates consensus behaviour, for current standardness rules correctness
|
||||||
|
@ -1190,7 +1184,6 @@ mod tests {
|
||||||
fn test_sighashtype_standard() {
|
fn test_sighashtype_standard() {
|
||||||
let nonstandard_hashtype = 0x04;
|
let nonstandard_hashtype = 0x04;
|
||||||
// This type is not well defined, by consensus it becomes ALL
|
// 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);
|
assert_eq!(EcdsaSigHashType::from_u32_consensus(nonstandard_hashtype), EcdsaSigHashType::All);
|
||||||
// But it's policy-invalid to use it!
|
// But it's policy-invalid to use it!
|
||||||
assert_eq!(EcdsaSigHashType::from_u32_standard(nonstandard_hashtype), Err(NonStandardSigHashType(0x04)));
|
assert_eq!(EcdsaSigHashType::from_u32_standard(nonstandard_hashtype), Err(NonStandardSigHashType(0x04)));
|
||||||
|
|
Loading…
Reference in New Issue