Skip to content

Commit

Permalink
bitcoind-tests: update dependencies
Browse files Browse the repository at this point in the history
Ok, everything should compile now.
  • Loading branch information
apoelstra committed Jun 15, 2023
1 parent 1a00d31 commit b1da1c9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion bitcoind-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ edition = "2018"
elements-miniscript = {path = "../"}
elementsd = {version = "0.6.0"}
actual-rand = { package = "rand", version = "0.8.4"}
secp256k1 = {version = "0.24.0", features = ["rand-std"]}
secp256k1 = {version = "0.27.0", features = ["rand-std"]}
8 changes: 4 additions & 4 deletions bitcoind-tests/tests/setup/test_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ pub struct PubData {
#[derive(Debug, Clone)]
pub struct SecretData {
pub sks: Vec<bitcoin::secp256k1::SecretKey>,
pub x_only_keypairs: Vec<bitcoin::KeyPair>,
pub x_only_keypairs: Vec<bitcoin::key::KeyPair>,
pub sha256_pre: [u8; 32],
pub hash256_pre: [u8; 32],
pub ripemd160_pre: [u8; 32],
Expand All @@ -77,7 +77,7 @@ fn setup_keys(
) -> (
Vec<bitcoin::secp256k1::SecretKey>,
Vec<miniscript::bitcoin::PublicKey>,
Vec<bitcoin::KeyPair>,
Vec<bitcoin::key::KeyPair>,
Vec<bitcoin::key::XOnlyPublicKey>,
) {
let secp_sign = secp256k1::Secp256k1::signing_only();
Expand All @@ -102,7 +102,7 @@ fn setup_keys(
let mut x_only_pks = vec![];

for i in 0..n {
let keypair = bitcoin::KeyPair::from_secret_key(&secp_sign, &sks[i]);
let keypair = bitcoin::key::KeyPair::from_secret_key(&secp_sign, &sks[i]);
let (xpk, _parity) = bitcoin::key::XOnlyPublicKey::from_keypair(&keypair);
x_only_keypairs.push(keypair);
x_only_pks.push(xpk);
Expand Down Expand Up @@ -359,7 +359,7 @@ fn subs_hash_frag(ms: &str, pubdata: &PubData) -> String {
);
let ms = ms.replace(
"hash256(H)",
&format!("hash256({})", &pubdata.hash256.into_inner().to_hex()),
&format!("hash256({})", &pubdata.hash256.to_hex()),
);
let ms = ms.replace(
"ripemd160(H)",
Expand Down
2 changes: 1 addition & 1 deletion bitcoind-tests/tests/test_cpp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ pub fn test_from_cpp_ms(cl: &ElementsD, testdata: &TestData) {
testdata.secretdata.sha256_pre.to_vec(),
);
psbts[i].inputs_mut()[0].hash256_preimages.insert(
sha256d::Hash::from_inner(testdata.pubdata.hash256.into_inner()),
sha256d::Hash::from_byte_array(testdata.pubdata.hash256.to_byte_array()),
testdata.secretdata.hash256_pre.to_vec(),
);
println!("{}", ms);
Expand Down
4 changes: 2 additions & 2 deletions bitcoind-tests/tests/test_desc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ pub fn test_desc_satisfy(
let internal_keypair = internal_keypair
.add_xonly_tweak(
&secp,
&Scalar::from_be_bytes(tr.spend_info().tap_tweak().into_inner())
&Scalar::from_be_bytes(tr.spend_info().tap_tweak().to_byte_array())
.expect("valid scalar"),
)
.expect("Tweaking failed");
Expand Down Expand Up @@ -272,7 +272,7 @@ pub fn test_desc_satisfy(
testdata.secretdata.sha256_pre.to_vec(),
);
psbt.inputs_mut()[0].hash256_preimages.insert(
sha256d::Hash::from_inner(testdata.pubdata.hash256.into_inner()),
sha256d::Hash::from_byte_array(testdata.pubdata.hash256.to_byte_array()),
testdata.secretdata.hash256_pre.to_vec(),
);
psbt.inputs_mut()[0].hash160_preimages.insert(
Expand Down

0 comments on commit b1da1c9

Please sign in to comment.