@@ -2694,8 +2694,8 @@ func testCustomChannelsLiquidityEdgeCasesCore(ctx context.Context,
2694
2694
logBalance (t .t , nodes , assetID , "after manual rfq hodl" )
2695
2695
2696
2696
// Edge case: Charlie negotiates a quote with Dave which has a low max
2697
- // amount (~170k sats). Then Charlie creates an invoice with a total
2698
- // amount slightly larger than the max allowed in the quote (200k sats).
2697
+ // amount (~17k sats). Then Charlie creates an invoice with a total
2698
+ // amount slightly larger than the max allowed in the quote (30k sats).
2699
2699
// Erin will try to pay that invoice with sats, in shards of max size
2700
2700
// 80k sats. Dave will eventually stop forwarding HTLCs as the RFQ HTLC
2701
2701
// tracking mechanism should stop them from being forwarded, as they
@@ -2706,7 +2706,7 @@ func testCustomChannelsLiquidityEdgeCasesCore(ctx context.Context,
2706
2706
res , err := charlieTap .RfqClient .AddAssetBuyOrder (
2707
2707
ctx , & rfqrpc.AddAssetBuyOrderRequest {
2708
2708
AssetSpecifier : & assetSpecifier ,
2709
- AssetMaxAmt : 10_000 ,
2709
+ AssetMaxAmt : 1_000 ,
2710
2710
Expiry : uint64 (inOneHour .Unix ()),
2711
2711
PeerPubKey : dave .PubKey [:],
2712
2712
TimeoutSeconds : 10 ,
@@ -2722,7 +2722,7 @@ func testCustomChannelsLiquidityEdgeCasesCore(ctx context.Context,
2722
2722
// manually generated, quote.
2723
2723
iResp , err := charlie .AddInvoice (ctx , & lnrpc.Invoice {
2724
2724
Memo : "" ,
2725
- Value : 200_000 ,
2725
+ Value : 30_000 ,
2726
2726
RPreimage : bytes .Repeat ([]byte {11 }, 32 ),
2727
2727
CltvExpiry : 60 ,
2728
2728
RouteHints : []* lnrpc.RouteHint {{
@@ -2737,11 +2737,22 @@ func testCustomChannelsLiquidityEdgeCasesCore(ctx context.Context,
2737
2737
// Now Erin tries to pay the invoice. Since rfq quote cannot satisfy the
2738
2738
// total amount of the invoice this payment will fail.
2739
2739
payInvoiceWithSatoshi (
2740
- t .t , erin , iResp , withPayErrSubStr ( "context deadline exceeded" ),
2741
- withFailure (lnrpc .Payment_FAILED , failureNone ),
2742
- withGroupKey (groupID ),
2740
+ t .t , erin , iResp ,
2741
+ withFailure (lnrpc .Payment_FAILED , failureNoRoute ),
2742
+ withGroupKey (groupID ), withSmallShards (),
2743
2743
)
2744
2744
2745
+ // Let's also cancel the invoice and assert that no HTLCs are still
2746
+ // in-flight.
2747
+ _ , err = charlie .InvoicesClient .CancelInvoice (
2748
+ ctx , & invoicesrpc.CancelInvoiceMsg {
2749
+ PaymentHash : iResp .RHash ,
2750
+ },
2751
+ )
2752
+ require .NoError (t .t , err )
2753
+
2754
+ assertNumHtlcs (t .t , dave , 0 )
2755
+
2745
2756
logBalance (t .t , nodes , assetID , "after small manual rfq" )
2746
2757
2747
2758
// Edge case: Fabia creates an invoice which Erin cannot satisfy with
0 commit comments