Merge rust-bitcoin/rust-bitcoin#4107: sighash: Document `witness_script` in p2wsh
82a8aefc53
sighash: Document witness_script in p2wsh (Jose Storopoli) Pull request description: A note suggestion for the `p2wsh_signature_hash` in the same vein as the one in the "sister" function `p2wpkh_signature_hash`:33f5e5a6ac/bitcoin/src/crypto/sighash.rs (L863-L867)
Any better wordings are welcomed. Not married to my sentences. ACKs for top commit: luisschwab: ACK82a8aefc53
Kixunil: ACK82a8aefc53
Tree-SHA512: 1ba5f9b7c287b5c1494ba9ab03c146ff99fa8be791397b61ff4609a8dbab5be5c1376d9f401b56ec4a94196eec5a96ba140965a5a8178938a2c293994e71dbfe
This commit is contained in:
commit
76a511dfb2
|
@ -886,6 +886,9 @@ impl<R: Borrow<Transaction>> SighashCache<R> {
|
|||
}
|
||||
|
||||
/// 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,
|
||||
|
|
Loading…
Reference in New Issue