From da170c15516b3cb1f17bc9182c217b5ce85708b1 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Fri, 7 Jan 2022 16:03:53 -0800 Subject: [PATCH] fixup! txscript: add new RawTxInTapscriptSignature to generate tapsript sigs --- txscript/sign.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/txscript/sign.go b/txscript/sign.go index c4b4748947..2e9fc06774 100644 --- a/txscript/sign.go +++ b/txscript/sign.go @@ -134,8 +134,8 @@ func TaprootWitnessSignature(tx *wire.MsgTx, sigHashes *TxSigHashes, idx int, // TODO(roasbeef): actually add code-sep to interface? not really used // anywhere.... func RawTxInTapscriptSignature(tx *wire.MsgTx, sigHashes *TxSigHashes, idx int, - amt int64, pkScript []byte, tapLeaf TapLeaf, tapScriptRootHash []byte, - hashType SigHashType, key *btcec.PrivateKey) ([]byte, error) { + amt int64, pkScript []byte, tapLeaf TapLeaf, hashType SigHashType, + key *btcec.PrivateKey) ([]byte, error) { // First, we'll start by compute the top-level taproot sighash. tapLeafHash := tapLeaf.TapHash() @@ -148,10 +148,6 @@ func RawTxInTapscriptSignature(tx *wire.MsgTx, sigHashes *TxSigHashes, idx int, return nil, err } - // Before we sign the sighash, we'll need to apply the taptweak to the - // private key based on the tapScriptRootHash. - privKeyTweak := TweakTaprootPrivKey(key, tapScriptRootHash) - // With the sighash constructed, we can sign it with the specified // private key. signature, err := schnorr.Sign(privKeyTweak, sigHash)