Merge pull request #293 from stevenroose/bip143-script-code

bip143: Rename witness_script to script_code
This commit is contained in:
Andrew Poelstra 2019-07-24 22:43:58 +00:00 committed by GitHub
commit b6c1266102
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -80,7 +80,7 @@ impl SighashComponents {
/// Compute the BIP143 sighash for a `SIGHASH_ALL` signature for the given
/// input.
pub fn sighash_all(&self, txin: &TxIn, witness_script: &Script, value: u64) -> sha256d::Hash {
pub fn sighash_all(&self, txin: &TxIn, script_code: &Script, value: u64) -> sha256d::Hash {
let mut enc = sha256d::Hash::engine();
self.tx_version.consensus_encode(&mut enc).unwrap();
self.hash_prevouts.consensus_encode(&mut enc).unwrap();
@ -89,7 +89,7 @@ impl SighashComponents {
.previous_output
.consensus_encode(&mut enc)
.unwrap();
witness_script.consensus_encode(&mut enc).unwrap();
script_code.consensus_encode(&mut enc).unwrap();
value.consensus_encode(&mut enc).unwrap();
txin.sequence.consensus_encode(&mut enc).unwrap();
self.hash_outputs.consensus_encode(&mut enc).unwrap();