@@ -504,7 +504,9 @@ func testCustomChannels(_ context.Context, net *NetworkHarness,
504
504
invoiceResp = createAssetInvoice (
505
505
t .t , charlie , dave , daveInvoiceAssetAmount , assetID ,
506
506
)
507
- payInvoiceWithSatoshi (t .t , charlie , invoiceResp )
507
+ payInvoiceWithSatoshi (
508
+ t .t , charlie , invoiceResp , lnrpc .Payment_SUCCEEDED ,
509
+ )
508
510
logBalance (t .t , nodes , assetID , "after asset invoice paid with sats" )
509
511
510
512
// We don't need to update the asset balances of Charlie and Dave here
@@ -547,7 +549,7 @@ func testCustomChannels(_ context.Context, net *NetworkHarness,
547
549
invoiceResp = createAssetInvoice (
548
550
t .t , erin , fabia , fabiaInvoiceAssetAmount2 , assetID ,
549
551
)
550
- payInvoiceWithSatoshi (t .t , dave , invoiceResp )
552
+ payInvoiceWithSatoshi (t .t , dave , invoiceResp , lnrpc . Payment_SUCCEEDED )
551
553
logBalance (t .t , nodes , assetID , "after invoice" )
552
554
553
555
erinAssetBalance -= fabiaInvoiceAssetAmount2
@@ -967,7 +969,7 @@ func testCustomChannelsGroupedAsset(_ context.Context, net *NetworkHarness,
967
969
invoiceResp = createAssetInvoice (
968
970
t .t , erin , fabia , fabiaInvoiceAssetAmount2 , assetID ,
969
971
)
970
- payInvoiceWithSatoshi (t .t , dave , invoiceResp )
972
+ payInvoiceWithSatoshi (t .t , dave , invoiceResp , lnrpc . Payment_SUCCEEDED )
971
973
logBalance (t .t , nodes , assetID , "after invoice" )
972
974
973
975
erinAssetBalance -= fabiaInvoiceAssetAmount2
@@ -1957,6 +1959,16 @@ func testCustomChannelsLiquidityEdgeCases(_ context.Context,
1957
1959
1958
1960
logBalance (t .t , nodes , assetID , "after big asset payment (asset " +
1959
1961
"invoice, multi-hop)" )
1962
+
1963
+ // Edge case: Now Charlie creates a tiny asset invoice to be paid for by
1964
+ // Yara with satoshi. This is a multi-hop payment going over 2 asset
1965
+ // channels, where the total asset value is less than the default anchor
1966
+ // amount of 354 sats.
1967
+ invoiceResp = createAssetInvoice (t .t , dave , charlie , 1 , assetID )
1968
+ payInvoiceWithSatoshi (t .t , yara , invoiceResp , lnrpc .Payment_FAILED )
1969
+
1970
+ logBalance (t .t , nodes , assetID , "after small payment (asset " +
1971
+ "invoice, <354sats)" )
1960
1972
}
1961
1973
1962
1974
// testCustomChannelsBalanceConsistency is a test that test the balance of nodes
0 commit comments