@@ -1582,6 +1582,8 @@ func (a *AuxSweeper) importCommitTx(req lnwallet.ResolutionReq,
15821582 }
15831583 }
15841584
1585+ supportSTXO := commitState .STXO .Val
1586+
15851587 // We can now add the witness for the OP_TRUE spend of the commitment
15861588 // output to the vPackets.
15871589 vPackets := maps .Values (vPktsByAssetID )
@@ -1590,8 +1592,13 @@ func (a *AuxSweeper) importCommitTx(req lnwallet.ResolutionReq,
15901592 "packets: %w" , err )
15911593 }
15921594
1595+ var opts []tapsend.OutputCommitmentOption
1596+ if ! supportSTXO {
1597+ opts = append (opts , tapsend .WithNoSTXOProofs ())
1598+ }
1599+
15931600 outCommitments , err := tapsend .CreateOutputCommitments (
1594- vPackets , tapsend . WithNoSTXOProofs () ,
1601+ vPackets , opts ... ,
15951602 )
15961603 if err != nil {
15971604 return fmt .Errorf ("unable to create output " +
@@ -1609,10 +1616,14 @@ func (a *AuxSweeper) importCommitTx(req lnwallet.ResolutionReq,
16091616 for idx := range vPackets {
16101617 vPkt := vPackets [idx ]
16111618 for outIdx := range vPkt .Outputs {
1619+ var opts []proof.GenOption
1620+ if ! supportSTXO {
1621+ opts = append (opts , proof .WithNoSTXOProofs ())
1622+ }
1623+
16121624 proofSuffix , err := tapsend .CreateProofSuffixCustom (
16131625 req .CommitTx , vPkt , outCommitments , outIdx ,
1614- vPackets , exclusionCreator ,
1615- proof .WithNoSTXOProofs (),
1626+ vPackets , exclusionCreator , opts ... ,
16161627 )
16171628 if err != nil {
16181629 return fmt .Errorf ("unable to create " +
@@ -2222,9 +2233,7 @@ func (a *AuxSweeper) sweepContracts(inputs []input.Input,
22222233
22232234 // Now that we have our set of resolutions, we'll make a new commitment
22242235 // out of all the vPackets contained.
2225- outCommitments , err := tapsend .CreateOutputCommitments (
2226- directPkts , tapsend .WithNoSTXOProofs (),
2227- )
2236+ outCommitments , err := tapsend .CreateOutputCommitments (directPkts )
22282237 if err != nil {
22292238 return lfn .Errf [returnType ]("unable to create " +
22302239 "output commitments: %w" , err )
@@ -2405,9 +2414,7 @@ func (a *AuxSweeper) registerAndBroadcastSweep(req *sweep.BumpRequest,
24052414 }
24062415
24072416 // Now that we have our vPkts, we'll re-create the output commitments.
2408- outCommitments , err := tapsend .CreateOutputCommitments (
2409- vPkts .allPkts (), tapsend .WithNoSTXOProofs (),
2410- )
2417+ outCommitments , err := tapsend .CreateOutputCommitments (vPkts .allPkts ())
24112418 if err != nil {
24122419 return fmt .Errorf ("unable to create output " +
24132420 "commitments: %w" , err )
@@ -2451,7 +2458,7 @@ func (a *AuxSweeper) registerAndBroadcastSweep(req *sweep.BumpRequest,
24512458
24522459 proofSuffix , err := tapsend .CreateProofSuffixCustom (
24532460 sweepTx , vPkt , outCommitments , outIdx , allVpkts ,
2454- exclusionCreator , proof . WithNoSTXOProofs (),
2461+ exclusionCreator ,
24552462 )
24562463 if err != nil {
24572464 return fmt .Errorf ("unable to create proof " +
0 commit comments