Merge rust-bitcoin/rust-bitcoin#2562: Replaced Deprecated Function

08a9962035 Replaced Deprecated Function (Sh0g0-1758)

Pull request description:

  Changed deprecated Function with a supported one.

ACKs for top commit:
  apoelstra:
    ACK 08a9962035 yep, this seems reasonable. Thanks!
  tcharding:
    ACK 08a9962035

Tree-SHA512: fd0a55ab25cd15a3254a6c353e4906b4f4c74175d648e1f532be8b8642490e5187b96aa0aa7365771016e10a481054d3377b9074b93cd001da515177315b0d92
This commit is contained in:
Andrew Poelstra 2024-03-09 22:48:24 +00:00
commit b3273cfcb8
No known key found for this signature in database
GPG Key ID: C588D63CE41B97C1
1 changed files with 4 additions and 4 deletions

View File

@ -354,15 +354,15 @@ fn script_hashes() {
#[test] #[test]
fn provably_unspendable_test() { fn provably_unspendable_test() {
// p2pk // p2pk
assert!(!ScriptBuf::from_hex("410446ef0102d1ec5240f0d061a4246c1bdef63fc3dbab7733052fbbf0ecd8f41fc26bf049ebb4f9527f374280259e7cfa99c48b0e3f39c51347a19a5819651503a5ac").unwrap().is_provably_unspendable()); assert!(!ScriptBuf::from_hex("410446ef0102d1ec5240f0d061a4246c1bdef63fc3dbab7733052fbbf0ecd8f41fc26bf049ebb4f9527f374280259e7cfa99c48b0e3f39c51347a19a5819651503a5ac").unwrap().is_op_return());
assert!(!ScriptBuf::from_hex("4104ea1feff861b51fe3f5f8a3b12d0f4712db80e919548a80839fc47c6a21e66d957e9c5d8cd108c7a2d2324bad71f9904ac0ae7336507d785b17a2c115e427a32fac").unwrap().is_provably_unspendable()); assert!(!ScriptBuf::from_hex("4104ea1feff861b51fe3f5f8a3b12d0f4712db80e919548a80839fc47c6a21e66d957e9c5d8cd108c7a2d2324bad71f9904ac0ae7336507d785b17a2c115e427a32fac").unwrap().is_op_return());
// p2pkhash // p2pkhash
assert!(!ScriptBuf::from_hex("76a914ee61d57ab51b9d212335b1dba62794ac20d2bcf988ac") assert!(!ScriptBuf::from_hex("76a914ee61d57ab51b9d212335b1dba62794ac20d2bcf988ac")
.unwrap() .unwrap()
.is_provably_unspendable()); .is_op_return());
assert!(ScriptBuf::from_hex("6aa9149eb21980dc9d413d8eac27314938b9da920ee53e87") assert!(ScriptBuf::from_hex("6aa9149eb21980dc9d413d8eac27314938b9da920ee53e87")
.unwrap() .unwrap()
.is_provably_unspendable()); .is_op_return());
} }
#[test] #[test]