Skip to content

Commit a9cedbb

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 4120388 commit a9cedbb

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

435435
witnessUtxo := r.Txn.TxOut[r.TxOutIdx]
436436

437+
commitTapscriptRoot, _ := r.TapscriptRoot()
438+
437439
packetPInputs = append(packetPInputs, psbt.PInput{
438440
WitnessUtxo: witnessUtxo,
439441
Bip32Derivation: []*psbt.Bip32Derivation{
@@ -443,6 +445,7 @@ func newRootCommitment(ctx context.Context,
443445
trBip32Derivation,
444446
},
445447
TaprootInternalKey: trBip32Derivation.XOnlyPubKey,
448+
TaprootMerkleRoot: commitTapscriptRoot,
446449
})
447450
})
448451

0 commit comments

Comments
 (0)