From 82a8aefc5341d04d2707858afdfda0fba9816ebd Mon Sep 17 00:00:00 2001 From: Jose Storopoli Date: Sun, 23 Feb 2025 08:57:02 -0300 Subject: [PATCH] sighash: Document witness_script in p2wsh --- bitcoin/src/crypto/sighash.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bitcoin/src/crypto/sighash.rs b/bitcoin/src/crypto/sighash.rs index 5498211a0..572db4a12 100644 --- a/bitcoin/src/crypto/sighash.rs +++ b/bitcoin/src/crypto/sighash.rs @@ -886,6 +886,9 @@ impl> SighashCache { } /// Computes the BIP143 sighash to spend a p2wsh transaction for any flag type. + /// + /// `witness_script` is the script that goes into the [`Witness`], + /// not the one that goes into `script_pubkey` of a [`TxOut`]. pub fn p2wsh_signature_hash( &mut self, input_index: usize,