Skip to content

Commit

Permalink
fixup! taroscript: allow custom signing of virtual TX
Browse files Browse the repository at this point in the history
  • Loading branch information
guggero committed Feb 22, 2023
1 parent f9f6d94 commit 24d4368
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions taroscript/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,8 @@ func CreateTaprootSignature(vIn *taropsbt.VInput, virtualTx *wire.MsgTx,
spendDesc.TapTweak = vIn.TaprootMerkleRoot

// One leaf hash and a merkle root means we're signing a specific
// script.
// script. There can be other scripts in the tree, but we only support
// creating a signature for a single one at a time.
case len(vIn.TaprootMerkleRoot) == sha256.Size &&
len(derivation.LeafHashes) == 1:

Expand All @@ -418,7 +419,6 @@ func CreateTaprootSignature(vIn *taropsbt.VInput, virtualTx *wire.MsgTx,
}

spendDesc.SignMethod = input.TaprootScriptSpendSignMethod
spendDesc.TapTweak = vIn.TaprootMerkleRoot
spendDesc.WitnessScript = leafScript.Script

// Some invalid combination of fields was specified, it's not clear what
Expand Down

0 comments on commit 24d4368

Please sign in to comment.