Skip to content

Commit 81f33ea

Browse files
committed
universe/supplycommit: fix PSBT bug, ensure the TaprootMerkleRoot is set
If this isn't set, then we can't do a spend, as lnd can't figure out how to sign for the PSBT input.
1 parent f1ba65b commit 81f33ea

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

universe/supplycommit/transitions.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,8 @@ func newRootCommitment(ctx context.Context,
445445

446446
witnessUtxo := r.Txn.TxOut[r.TxOutIdx]
447447

448+
commitTapscriptRoot, _ := r.TapscriptRoot()
449+
448450
packetPInputs = append(packetPInputs, psbt.PInput{
449451
WitnessUtxo: witnessUtxo,
450452
Bip32Derivation: []*psbt.Bip32Derivation{
@@ -454,6 +456,7 @@ func newRootCommitment(ctx context.Context,
454456
trBip32Derivation,
455457
},
456458
TaprootInternalKey: trBip32Derivation.XOnlyPubKey,
459+
TaprootMerkleRoot: commitTapscriptRoot,
457460
})
458461
})
459462

0 commit comments

Comments
 (0)