@@ -1582,6 +1582,8 @@ func (a *AuxSweeper) importCommitTx(req lnwallet.ResolutionReq,
1582
1582
}
1583
1583
}
1584
1584
1585
+ supportSTXO := commitState .STXO .Val
1586
+
1585
1587
// We can now add the witness for the OP_TRUE spend of the commitment
1586
1588
// output to the vPackets.
1587
1589
vPackets := maps .Values (vPktsByAssetID )
@@ -1590,8 +1592,13 @@ func (a *AuxSweeper) importCommitTx(req lnwallet.ResolutionReq,
1590
1592
"packets: %w" , err )
1591
1593
}
1592
1594
1595
+ var opts []tapsend.OutputCommitmentOption
1596
+ if ! supportSTXO {
1597
+ opts = append (opts , tapsend .WithNoSTXOProofs ())
1598
+ }
1599
+
1593
1600
outCommitments , err := tapsend .CreateOutputCommitments (
1594
- vPackets , tapsend . WithNoSTXOProofs () ,
1601
+ vPackets , opts ... ,
1595
1602
)
1596
1603
if err != nil {
1597
1604
return fmt .Errorf ("unable to create output " +
@@ -1609,10 +1616,14 @@ func (a *AuxSweeper) importCommitTx(req lnwallet.ResolutionReq,
1609
1616
for idx := range vPackets {
1610
1617
vPkt := vPackets [idx ]
1611
1618
for outIdx := range vPkt .Outputs {
1619
+ var opts []proof.GenOption
1620
+ if ! supportSTXO {
1621
+ opts = append (opts , proof .WithNoSTXOProofs ())
1622
+ }
1623
+
1612
1624
proofSuffix , err := tapsend .CreateProofSuffixCustom (
1613
1625
req .CommitTx , vPkt , outCommitments , outIdx ,
1614
- vPackets , exclusionCreator ,
1615
- proof .WithNoSTXOProofs (),
1626
+ vPackets , exclusionCreator , opts ... ,
1616
1627
)
1617
1628
if err != nil {
1618
1629
return fmt .Errorf ("unable to create " +
@@ -2222,9 +2233,7 @@ func (a *AuxSweeper) sweepContracts(inputs []input.Input,
2222
2233
2223
2234
// Now that we have our set of resolutions, we'll make a new commitment
2224
2235
// out of all the vPackets contained.
2225
- outCommitments , err := tapsend .CreateOutputCommitments (
2226
- directPkts , tapsend .WithNoSTXOProofs (),
2227
- )
2236
+ outCommitments , err := tapsend .CreateOutputCommitments (directPkts )
2228
2237
if err != nil {
2229
2238
return lfn .Errf [returnType ]("unable to create " +
2230
2239
"output commitments: %w" , err )
@@ -2405,9 +2414,7 @@ func (a *AuxSweeper) registerAndBroadcastSweep(req *sweep.BumpRequest,
2405
2414
}
2406
2415
2407
2416
// 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 ())
2411
2418
if err != nil {
2412
2419
return fmt .Errorf ("unable to create output " +
2413
2420
"commitments: %w" , err )
@@ -2451,7 +2458,7 @@ func (a *AuxSweeper) registerAndBroadcastSweep(req *sweep.BumpRequest,
2451
2458
2452
2459
proofSuffix , err := tapsend .CreateProofSuffixCustom (
2453
2460
sweepTx , vPkt , outCommitments , outIdx , allVpkts ,
2454
- exclusionCreator , proof . WithNoSTXOProofs (),
2461
+ exclusionCreator ,
2455
2462
)
2456
2463
if err != nil {
2457
2464
return fmt .Errorf ("unable to create proof " +
0 commit comments