Skip to content

Commit 6f5581e

Browse files
committed
Fixup: use explicit script leaf hash for taproot inputs
This makes signing taproot inputs much cleaner to implement.
1 parent 14a0d20 commit 6f5581e

File tree

3 files changed

+64
-131
lines changed

3 files changed

+64
-131
lines changed

eclair-core/src/main/scala/fr/acinq/eclair/channel/Helpers.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ object Helpers {
382382
case SimpleTaprootChannelCommitmentFormat =>
383383
val fundingScript = Taproot.musig2FundingScript(fundingPubkey1, fundingPubkey2)
384384
val fundingTxOut = TxOut(fundingSatoshis, fundingScript)
385-
InputInfo.TaprootInput(OutPoint(fundingTxId, fundingTxOutputIndex), fundingTxOut, Taproot.musig2Aggregate(fundingPubkey1, fundingPubkey2), None)
385+
InputInfo.TaprootInput(OutPoint(fundingTxId, fundingTxOutputIndex), fundingTxOut, Taproot.musig2Aggregate(fundingPubkey1, fundingPubkey2), None, ByteVector32.Zeroes)
386386
case _ =>
387387
val fundingScript = multiSig2of2(fundingPubkey1, fundingPubkey2)
388388
val fundingTxOut = TxOut(fundingSatoshis, pay2wsh(fundingScript))

0 commit comments

Comments
 (0)