diff --git a/bitcoin/examples/sign-tx-segwit-v0.rs b/bitcoin/examples/sign-tx-segwit-v0.rs index 288eb66b..73507f1f 100644 --- a/bitcoin/examples/sign-tx-segwit-v0.rs +++ b/bitcoin/examples/sign-tx-segwit-v0.rs @@ -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). diff --git a/bitcoin/src/consensus/params.rs b/bitcoin/src/consensus/params.rs index 3cc70f5d..4faa92a5 100644 --- a/bitcoin/src/consensus/params.rs +++ b/bitcoin/src/consensus/params.rs @@ -130,7 +130,7 @@ pub static SIGNET: Params = Params::SIGNET; /// The regtest parameters. pub static REGTEST: Params = Params::REGTEST; -#[allow(deprecated)] // For `pow_limit`. +#[allow(deprecated)] // For `pow_limit`. impl Params { /// The mainnet parameters (alias for `Params::MAINNET`). pub const BITCOIN: Params = Params::MAINNET; diff --git a/bitcoin/tests/psbt-sign-taproot.rs b/bitcoin/tests/psbt-sign-taproot.rs index 4cf7616b..78fbcdd6 100644 --- a/bitcoin/tests/psbt-sign-taproot.rs +++ b/bitcoin/tests/psbt-sign-taproot.rs @@ -31,13 +31,12 @@ fn psbt_sign_taproot() { _secp: &Secp256k1, ) -> Result, 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), } }