@@ -481,7 +481,9 @@ func testCustomChannels(_ context.Context, net *NetworkHarness,
481481 invoiceResp = createAssetInvoice (
482482 t .t , charlie , dave , daveInvoiceAssetAmount , assetID ,
483483 )
484- payInvoiceWithSatoshi (t .t , charlie , invoiceResp )
484+ payInvoiceWithSatoshi (
485+ t .t , charlie , invoiceResp , lnrpc .Payment_SUCCEEDED ,
486+ )
485487 logBalance (t .t , nodes , assetID , "after asset invoice paid with sats" )
486488
487489 // We don't need to update the asset balances of Charlie and Dave here
@@ -524,7 +526,7 @@ func testCustomChannels(_ context.Context, net *NetworkHarness,
524526 invoiceResp = createAssetInvoice (
525527 t .t , erin , fabia , fabiaInvoiceAssetAmount2 , assetID ,
526528 )
527- payInvoiceWithSatoshi (t .t , dave , invoiceResp )
529+ payInvoiceWithSatoshi (t .t , dave , invoiceResp , lnrpc . Payment_SUCCEEDED )
528530 logBalance (t .t , nodes , assetID , "after invoice" )
529531
530532 erinAssetBalance -= fabiaInvoiceAssetAmount2
@@ -952,7 +954,7 @@ func testCustomChannelsGroupedAsset(_ context.Context, net *NetworkHarness,
952954 invoiceResp = createAssetInvoice (
953955 t .t , erin , fabia , fabiaInvoiceAssetAmount2 , assetID ,
954956 )
955- payInvoiceWithSatoshi (t .t , dave , invoiceResp )
957+ payInvoiceWithSatoshi (t .t , dave , invoiceResp , lnrpc . Payment_SUCCEEDED )
956958 logBalance (t .t , nodes , assetID , "after invoice" )
957959
958960 erinAssetBalance -= fabiaInvoiceAssetAmount2
@@ -1940,4 +1942,17 @@ func testCustomChannelsLiquidityEdgeCases(_ context.Context,
19401942
19411943 logBalance (t .t , nodes , assetID , "after big asset payment (asset " +
19421944 "invoice, multi-hop)" )
1945+
1946+ // Edge case: Now Charlie creates a tiny asset invoice to be paid for by
1947+ // Yara with satoshi. This is a multi-hop payment going over 2 asset
1948+ // channels, where the total asset value is less than the default anchor
1949+ // amount of 354 sats.
1950+ invoiceResp = createAssetInvoice (
1951+ t .t , dave , charlie , 1 , assetID ,
1952+ )
1953+
1954+ payInvoiceWithSatoshi (t .t , yara , invoiceResp , lnrpc .Payment_FAILED )
1955+
1956+ logBalance (t .t , nodes , assetID , "after small payment (asset " +
1957+ "invoice, <354sats)" )
19431958}
0 commit comments