Skip to content

Commit d974383

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 869063c commit d974383

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
@@ -444,6 +444,8 @@ func newRootCommitment(ctx context.Context,
444444

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

447+
commitTapscriptRoot, _ := r.TapscriptRoot()
448+
447449
packetPInputs = append(packetPInputs, psbt.PInput{
448450
WitnessUtxo: witnessUtxo,
449451
Bip32Derivation: []*psbt.Bip32Derivation{
@@ -453,6 +455,7 @@ func newRootCommitment(ctx context.Context,
453455
trBip32Derivation,
454456
},
455457
TaprootInternalKey: trBip32Derivation.XOnlyPubKey,
458+
TaprootMerkleRoot: commitTapscriptRoot,
456459
})
457460
})
458461

0 commit comments

Comments
 (0)