From 1442714d5173ec04bbe504aad70d1d430b31b66f Mon Sep 17 00:00:00 2001 From: Conner Fromknecht Date: Fri, 19 Apr 2019 19:10:48 -0700 Subject: [PATCH] txscript/sign: Use calcWitnessSigHashRaw for witness sigs --- txscript/sign.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/txscript/sign.go b/txscript/sign.go index 51c69103cf..138e31cdd4 100644 --- a/txscript/sign.go +++ b/txscript/sign.go @@ -22,12 +22,7 @@ func RawTxInWitnessSignature(tx *wire.MsgTx, sigHashes *TxSigHashes, idx int, amt int64, subScript []byte, hashType SigHashType, key *btcec.PrivateKey) ([]byte, error) { - parsedScript, err := parseScript(subScript) - if err != nil { - return nil, fmt.Errorf("cannot parse output script: %v", err) - } - - hash, err := calcWitnessSignatureHash(parsedScript, sigHashes, hashType, tx, + hash, err := calcWitnessSignatureHashRaw(subScript, sigHashes, hashType, tx, idx, amt) if err != nil { return nil, err