4545 }
4646
4747 shortTimeout = time .Second * 5
48+
49+ defaultPaymentStatus = fn .None [lnrpc.Payment_PaymentStatus ]()
4850)
4951
5052var (
@@ -222,7 +224,10 @@ func testCustomChannelsLarge(_ context.Context, net *NetworkHarness,
222224 invoiceResp := createAssetInvoice (
223225 t .t , erin , fabia , fabiaInvoiceAssetAmount , assetID ,
224226 )
225- payInvoiceWithAssets (t .t , charlie , dave , invoiceResp , assetID , false )
227+ payInvoiceWithAssets (
228+ t .t , charlie , dave , invoiceResp .PaymentRequest , assetID , false ,
229+ defaultPaymentStatus ,
230+ )
226231 logBalance (t .t , nodes , assetID , "after invoice" )
227232
228233 invoiceResp2 := createAssetInvoice (
@@ -234,15 +239,21 @@ func testCustomChannelsLarge(_ context.Context, net *NetworkHarness,
234239 // amount of zero.
235240 time .Sleep (time .Second * 1 )
236241
237- payInvoiceWithAssets (t .t , fabia , erin , invoiceResp2 , assetID , false )
242+ payInvoiceWithAssets (
243+ t .t , fabia , erin , invoiceResp2 .PaymentRequest , assetID , false ,
244+ defaultPaymentStatus ,
245+ )
238246 logBalance (t .t , nodes , assetID , "after invoice 2" )
239247
240248 // Now we send a large invoice from Charlie to Dave.
241249 const largeInvoiceAmount = 100_000
242250 invoiceResp3 := createAssetInvoice (
243251 t .t , charlie , dave , largeInvoiceAmount , assetID ,
244252 )
245- payInvoiceWithAssets (t .t , charlie , dave , invoiceResp3 , assetID , false )
253+ payInvoiceWithAssets (
254+ t .t , charlie , dave , invoiceResp3 .PaymentRequest , assetID , false ,
255+ defaultPaymentStatus ,
256+ )
246257 logBalance (t .t , nodes , assetID , "after invoice 3" )
247258
248259 // Make sure the invoice on the receiver side and the payment on the
@@ -431,7 +442,10 @@ func testCustomChannels(_ context.Context, net *NetworkHarness,
431442 invoiceResp := createAssetInvoice (
432443 t .t , dave , charlie , charlieInvoiceAmount , assetID ,
433444 )
434- payInvoiceWithAssets (t .t , dave , charlie , invoiceResp , assetID , true )
445+ payInvoiceWithAssets (
446+ t .t , dave , charlie , invoiceResp .PaymentRequest , assetID , true ,
447+ defaultPaymentStatus ,
448+ )
435449 logBalance (t .t , nodes , assetID , "after invoice back" )
436450
437451 // Make sure the invoice on the receiver side and the payment on the
@@ -493,7 +507,10 @@ func testCustomChannels(_ context.Context, net *NetworkHarness,
493507 invoiceResp = createAssetInvoice (
494508 t .t , charlie , dave , daveInvoiceAssetAmount , assetID ,
495509 )
496- payInvoiceWithAssets (t .t , charlie , dave , invoiceResp , assetID , true )
510+ payInvoiceWithAssets (
511+ t .t , charlie , dave , invoiceResp .PaymentRequest , assetID , true ,
512+ defaultPaymentStatus ,
513+ )
497514 logBalance (t .t , nodes , assetID , "after invoice" )
498515
499516 charlieAssetBalance -= daveInvoiceAssetAmount
@@ -535,7 +552,10 @@ func testCustomChannels(_ context.Context, net *NetworkHarness,
535552 invoiceResp = createAssetInvoice (
536553 t .t , erin , fabia , fabiaInvoiceAssetAmount1 , assetID ,
537554 )
538- payInvoiceWithAssets (t .t , charlie , dave , invoiceResp , assetID , true )
555+ payInvoiceWithAssets (
556+ t .t , charlie , dave , invoiceResp .PaymentRequest , assetID , true ,
557+ defaultPaymentStatus ,
558+ )
539559 logBalance (t .t , nodes , assetID , "after invoice" )
540560
541561 charlieAssetBalance -= fabiaInvoiceAssetAmount1
@@ -569,7 +589,10 @@ func testCustomChannels(_ context.Context, net *NetworkHarness,
569589 invoiceResp = createAssetInvoice (
570590 t .t , erin , fabia , fabiaInvoiceAssetAmount3 , assetID ,
571591 )
572- payInvoiceWithAssets (t .t , charlie , dave , invoiceResp , assetID , true )
592+ payInvoiceWithAssets (
593+ t .t , charlie , dave , invoiceResp .PaymentRequest , assetID , true ,
594+ defaultPaymentStatus ,
595+ )
573596 logBalance (t .t , nodes , assetID , "after invoice" )
574597
575598 charlieAssetBalance -= fabiaInvoiceAssetAmount3
@@ -587,7 +610,10 @@ func testCustomChannels(_ context.Context, net *NetworkHarness,
587610 invoiceResp = createAssetInvoice (
588611 t .t , dave , yara , yaraInvoiceAssetAmount1 , assetID ,
589612 )
590- payInvoiceWithAssets (t .t , charlie , dave , invoiceResp , assetID , true )
613+ payInvoiceWithAssets (
614+ t .t , charlie , dave , invoiceResp .PaymentRequest , assetID , true ,
615+ defaultPaymentStatus ,
616+ )
591617 logBalance (t .t , nodes , assetID , "after asset-to-asset" )
592618
593619 charlieAssetBalance -= yaraInvoiceAssetAmount1
@@ -920,7 +946,10 @@ func testCustomChannelsGroupedAsset(_ context.Context, net *NetworkHarness,
920946 invoiceResp := createAssetInvoice (
921947 t .t , charlie , dave , daveInvoiceAssetAmount , assetID ,
922948 )
923- payInvoiceWithAssets (t .t , charlie , dave , invoiceResp , assetID , true )
949+ payInvoiceWithAssets (
950+ t .t , charlie , dave , invoiceResp .PaymentRequest , assetID , true ,
951+ defaultPaymentStatus ,
952+ )
924953 logBalance (t .t , nodes , assetID , "after invoice" )
925954
926955 // Make sure the invoice on the receiver side and the payment on the
@@ -955,7 +984,10 @@ func testCustomChannelsGroupedAsset(_ context.Context, net *NetworkHarness,
955984 invoiceResp = createAssetInvoice (
956985 t .t , erin , fabia , fabiaInvoiceAssetAmount1 , assetID ,
957986 )
958- payInvoiceWithAssets (t .t , charlie , dave , invoiceResp , assetID , true )
987+ payInvoiceWithAssets (
988+ t .t , charlie , dave , invoiceResp .PaymentRequest , assetID , true ,
989+ defaultPaymentStatus ,
990+ )
959991 logBalance (t .t , nodes , assetID , "after invoice" )
960992
961993 charlieAssetBalance -= fabiaInvoiceAssetAmount1
@@ -989,7 +1021,10 @@ func testCustomChannelsGroupedAsset(_ context.Context, net *NetworkHarness,
9891021 invoiceResp = createAssetInvoice (
9901022 t .t , erin , fabia , fabiaInvoiceAssetAmount3 , assetID ,
9911023 )
992- payInvoiceWithAssets (t .t , charlie , dave , invoiceResp , assetID , true )
1024+ payInvoiceWithAssets (
1025+ t .t , charlie , dave , invoiceResp .PaymentRequest , assetID , true ,
1026+ defaultPaymentStatus ,
1027+ )
9931028 logBalance (t .t , nodes , assetID , "after invoice" )
9941029
9951030 charlieAssetBalance -= fabiaInvoiceAssetAmount3
@@ -1007,7 +1042,10 @@ func testCustomChannelsGroupedAsset(_ context.Context, net *NetworkHarness,
10071042 invoiceResp = createAssetInvoice (
10081043 t .t , dave , yara , yaraInvoiceAssetAmount1 , assetID ,
10091044 )
1010- payInvoiceWithAssets (t .t , charlie , dave , invoiceResp , assetID , true )
1045+ payInvoiceWithAssets (
1046+ t .t , charlie , dave , invoiceResp .PaymentRequest , assetID , true ,
1047+ defaultPaymentStatus ,
1048+ )
10111049 logBalance (t .t , nodes , assetID , "after asset-to-asset" )
10121050
10131051 charlieAssetBalance -= yaraInvoiceAssetAmount1
@@ -1916,7 +1954,11 @@ func testCustomChannelsLiquidityEdgeCases(_ context.Context,
19161954 invoiceResp := createAssetInvoice (
19171955 t .t , charlie , dave , bigAssetAmount , assetID ,
19181956 )
1919- payInvoiceWithAssets (t .t , charlie , dave , invoiceResp , assetID , false )
1957+
1958+ payInvoiceWithAssets (
1959+ t .t , charlie , dave , invoiceResp .PaymentRequest , assetID , false ,
1960+ defaultPaymentStatus ,
1961+ )
19201962
19211963 logBalance (t .t , nodes , assetID , "after big asset payment (asset " +
19221964 "invoice, direct)" )
@@ -1959,7 +2001,10 @@ func testCustomChannelsLiquidityEdgeCases(_ context.Context,
19592001 t .t , dave , charlie , bigAssetAmount , assetID ,
19602002 )
19612003
1962- payInvoiceWithAssets (t .t , yara , dave , invoiceResp , assetID , false )
2004+ payInvoiceWithAssets (
2005+ t .t , yara , dave , invoiceResp .PaymentRequest , assetID , false ,
2006+ defaultPaymentStatus ,
2007+ )
19632008
19642009 logBalance (t .t , nodes , assetID , "after big asset payment (asset " +
19652010 "invoice, multi-hop)" )
@@ -2516,7 +2561,8 @@ func testCustomChannelsOraclePricing(_ context.Context,
25162561 require .EqualValues (t .t , 153_333_242 , decodedInvoice .NumMsat )
25172562
25182563 numUnits , rate := payInvoiceWithAssets (
2519- t .t , charlie , dave , invoiceResp , assetID , false ,
2564+ t .t , charlie , dave , invoiceResp .PaymentRequest , assetID , false ,
2565+ defaultPaymentStatus ,
25202566 )
25212567 logBalance (t .t , nodes , assetID , "after invoice" )
25222568
0 commit comments