2024-04-21 automated rustfmt nightly
This commit is contained in:
parent
76a5909029
commit
3417c576ed
|
@ -61,7 +61,12 @@ fn main() {
|
|||
let sighash_type = EcdsaSighashType::All;
|
||||
let mut sighasher = SighashCache::new(&mut unsigned_tx);
|
||||
let sighash = sighasher
|
||||
.p2wpkh_signature_hash(input_index, &dummy_utxo.script_pubkey, DUMMY_UTXO_AMOUNT, sighash_type)
|
||||
.p2wpkh_signature_hash(
|
||||
input_index,
|
||||
&dummy_utxo.script_pubkey,
|
||||
DUMMY_UTXO_AMOUNT,
|
||||
sighash_type,
|
||||
)
|
||||
.expect("failed to create sighash");
|
||||
|
||||
// Sign the sighash using the secp256k1 library (exported by rust-bitcoin).
|
||||
|
|
|
@ -31,13 +31,12 @@ fn psbt_sign_taproot() {
|
|||
_secp: &Secp256k1<C>,
|
||||
) -> Result<Option<PrivateKey>, Self::Error> {
|
||||
match key_request {
|
||||
KeyRequest::Bip32((mfp, _)) => {
|
||||
KeyRequest::Bip32((mfp, _)) =>
|
||||
if mfp == self.mfp {
|
||||
Ok(Some(self.sk))
|
||||
} else {
|
||||
Err(SignError::KeyNotFound)
|
||||
}
|
||||
}
|
||||
},
|
||||
_ => Err(SignError::KeyNotFound),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue