Merge rust-bitcoin/rust-bitcoin#3925: Automated nightly rustfmt (2025-01-19)

fec6a7669e 2025-01-19 automated rustfmt nightly (Fmt Bot)

Pull request description:

  Automated nightly `rustfmt` changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action

ACKs for top commit:
  tcharding:
    ACK fec6a7669e

Tree-SHA512: db7d2c8282059a6e19274e589e72da2477dda1cb6e618d2a237b371ed0d59a2cc5a32fa5203221bf6beb716477730dadfff97bfc9d5af448929c93230ec9faaa
This commit is contained in:
merge-script 2025-01-19 14:09:02 +11:00
commit afc3690ac6
No known key found for this signature in database
GPG Key ID: 40BF9E4C269D6607
1 changed files with 1 additions and 6 deletions

View File

@ -125,12 +125,7 @@ fn compute_sighash_p2wsh(raw_tx: &[u8], inp_idx: usize, amount: Amount) {
assert!((70..=72).contains(&sig_len), "signature length {} out of bounds", sig_len); assert!((70..=72).contains(&sig_len), "signature length {} out of bounds", sig_len);
//here we assume that all sighash_flags are the same. Can they be different? //here we assume that all sighash_flags are the same. Can they be different?
let sighash = cache let sighash = cache
.p2wsh_signature_hash( .p2wsh_signature_hash(inp_idx, witness_script, amount, sig.sighash_type)
inp_idx,
witness_script,
amount,
sig.sighash_type,
)
.expect("failed to compute sighash"); .expect("failed to compute sighash");
println!("SegWit p2wsh sighash: {:x} ({})", sighash, sig.sighash_type); println!("SegWit p2wsh sighash: {:x} ({})", sighash, sig.sighash_type);
} }