2024-04-21 automated rustfmt nightly

This commit is contained in:
Fmt Bot 2024-04-21 01:03:30 +00:00 committed by github-actions[bot]
parent 76a5909029
commit 3417c576ed
3 changed files with 9 additions and 5 deletions

View File

@ -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).

View File

@ -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),
}
}