@@ -1585,6 +1585,8 @@ func (a *AuxSweeper) importCommitTx(req lnwallet.ResolutionReq,
1585
1585
}
1586
1586
}
1587
1587
1588
+ supportSTXO := commitState .STXO .Val
1589
+
1588
1590
// We can now add the witness for the OP_TRUE spend of the commitment
1589
1591
// output to the vPackets.
1590
1592
vPackets := maps .Values (vPktsByAssetID )
@@ -1593,8 +1595,13 @@ func (a *AuxSweeper) importCommitTx(req lnwallet.ResolutionReq,
1593
1595
"packets: %w" , err )
1594
1596
}
1595
1597
1598
+ var opts []tapsend.OutputCommitmentOption
1599
+ if ! supportSTXO {
1600
+ opts = append (opts , tapsend .WithNoSTXOProofs ())
1601
+ }
1602
+
1596
1603
outCommitments , err := tapsend .CreateOutputCommitments (
1597
- vPackets , tapsend . WithNoSTXOProofs () ,
1604
+ vPackets , opts ... ,
1598
1605
)
1599
1606
if err != nil {
1600
1607
return fmt .Errorf ("unable to create output " +
@@ -1612,10 +1619,14 @@ func (a *AuxSweeper) importCommitTx(req lnwallet.ResolutionReq,
1612
1619
for idx := range vPackets {
1613
1620
vPkt := vPackets [idx ]
1614
1621
for outIdx := range vPkt .Outputs {
1622
+ var opts []proof.GenOption
1623
+ if ! supportSTXO {
1624
+ opts = append (opts , proof .WithNoSTXOProofs ())
1625
+ }
1626
+
1615
1627
proofSuffix , err := tapsend .CreateProofSuffixCustom (
1616
1628
req .CommitTx , vPkt , outCommitments , outIdx ,
1617
- vPackets , exclusionCreator ,
1618
- proof .WithNoSTXOProofs (),
1629
+ vPackets , exclusionCreator , opts ... ,
1619
1630
)
1620
1631
if err != nil {
1621
1632
return fmt .Errorf ("unable to create " +
@@ -2225,9 +2236,7 @@ func (a *AuxSweeper) sweepContracts(inputs []input.Input,
2225
2236
2226
2237
// Now that we have our set of resolutions, we'll make a new commitment
2227
2238
// out of all the vPackets contained.
2228
- outCommitments , err := tapsend .CreateOutputCommitments (
2229
- directPkts , tapsend .WithNoSTXOProofs (),
2230
- )
2239
+ outCommitments , err := tapsend .CreateOutputCommitments (directPkts )
2231
2240
if err != nil {
2232
2241
return lfn .Errf [returnType ]("unable to create " +
2233
2242
"output commitments: %w" , err )
@@ -2408,9 +2417,7 @@ func (a *AuxSweeper) registerAndBroadcastSweep(req *sweep.BumpRequest,
2408
2417
}
2409
2418
2410
2419
// Now that we have our vPkts, we'll re-create the output commitments.
2411
- outCommitments , err := tapsend .CreateOutputCommitments (
2412
- vPkts .allPkts (), tapsend .WithNoSTXOProofs (),
2413
- )
2420
+ outCommitments , err := tapsend .CreateOutputCommitments (vPkts .allPkts ())
2414
2421
if err != nil {
2415
2422
return fmt .Errorf ("unable to create output " +
2416
2423
"commitments: %w" , err )
@@ -2454,7 +2461,7 @@ func (a *AuxSweeper) registerAndBroadcastSweep(req *sweep.BumpRequest,
2454
2461
2455
2462
proofSuffix , err := tapsend .CreateProofSuffixCustom (
2456
2463
sweepTx , vPkt , outCommitments , outIdx , allVpkts ,
2457
- exclusionCreator , proof . WithNoSTXOProofs (),
2464
+ exclusionCreator ,
2458
2465
)
2459
2466
if err != nil {
2460
2467
return fmt .Errorf ("unable to create proof " +
0 commit comments