Merge rust-bitcoin/rust-bitcoin#1345: Fix broken build due to conflict between #1340 and #999

c4084b91fb Fix broken build due to conflict between #1340 and #999 (Andrew Poelstra)

Pull request description:

  I will test merge commits more thoroughly before signing off on them in future, sorry.

ACKs for top commit:
  DanGould:
    tACK c4084b91fb
  tcharding:
    ACK c4084b91fb
  sanket1729:
    ACK c4084b91fb

Tree-SHA512: 51ece3aa43045e81138d21b8402b1ec1559a0b37bdfc4c5246ff46fd085364517449a2e20e625934cbc0c96f18eb2fc6121a6e993fd5b9535ae54c863d032a0b
This commit is contained in:
sanket1729 2022-10-27 02:06:12 -07:00
commit bd80ecd92d
No known key found for this signature in database
GPG Key ID: 648FFB183E0870A2
1 changed files with 5 additions and 5 deletions

View File

@ -90,13 +90,13 @@ use bitcoin::secp256k1::{Message, Secp256k1};
use bitcoin::util::bip32::{
ChildNumber, DerivationPath, ExtendedPrivKey, ExtendedPubKey, Fingerprint,
};
use bitcoin::util::sighash;
use bitcoin::sighash::{self, SighashCache, SchnorrSighashType};
use bitcoin::util::taproot::{
LeafVersion, TapLeafHash, TapSighashHash, TaprootBuilder, TaprootSpendInfo,
};
use bitcoin::{
absolute, script, Address, Amount, OutPoint, SchnorrSig, SchnorrSighashType, Script,
SighashCache, Transaction, TxIn, TxOut, Txid, Witness, XOnlyPublicKey,
absolute, script, Address, Amount, OutPoint, SchnorrSig, Script,
Transaction, TxIn, TxOut, Txid, Witness, XOnlyPublicKey,
};
fn main() -> Result<(), Box<dyn std::error::Error>> {
@ -276,7 +276,7 @@ fn generate_bip86_key_spend_tx(
let hash_ty = input
.sighash_type
.and_then(|psbt_sighash_type| psbt_sighash_type.schnorr_hash_ty().ok())
.unwrap_or(bitcoin::SchnorrSighashType::All);
.unwrap_or(SchnorrSighashType::All);
let hash = SighashCache::new(&unsigned_tx).taproot_key_spend_signature_hash(
vout,
&sighash::Prevouts::All(&[TxOut {
@ -649,7 +649,7 @@ impl BeneficiaryWallet {
let secret_key =
self.master_xpriv.derive_priv(&self.secp, &derivation_path)?.to_priv().inner;
for lh in leaf_hashes {
let hash_ty = bitcoin::SchnorrSighashType::All;
let hash_ty = SchnorrSighashType::All;
let hash = SighashCache::new(&unsigned_tx).taproot_script_spend_signature_hash(
0,
&sighash::Prevouts::All(&[TxOut {