@@ -3056,8 +3056,8 @@ func testCustomChannelsLiquidityEdgeCasesCore(ctx context.Context,
3056
3056
logBalance (t .t , nodes , assetID , "after manual rfq hodl" )
3057
3057
3058
3058
// Edge case: Charlie negotiates a quote with Dave which has a low max
3059
- // amount (~170k sats). Then Charlie creates an invoice with a total
3060
- // amount slightly larger than the max allowed in the quote (200k sats).
3059
+ // amount (~17k sats). Then Charlie creates an invoice with a total
3060
+ // amount slightly larger than the max allowed in the quote (30k sats).
3061
3061
// Erin will try to pay that invoice with sats, in shards of max size
3062
3062
// 80k sats. Dave will eventually stop forwarding HTLCs as the RFQ HTLC
3063
3063
// tracking mechanism should stop them from being forwarded, as they
@@ -3068,7 +3068,7 @@ func testCustomChannelsLiquidityEdgeCasesCore(ctx context.Context,
3068
3068
res , err := charlieTap .RfqClient .AddAssetBuyOrder (
3069
3069
ctx , & rfqrpc.AddAssetBuyOrderRequest {
3070
3070
AssetSpecifier : & assetSpecifier ,
3071
- AssetMaxAmt : 10_000 ,
3071
+ AssetMaxAmt : 1_000 ,
3072
3072
Expiry : uint64 (inOneHour .Unix ()),
3073
3073
PeerPubKey : dave .PubKey [:],
3074
3074
TimeoutSeconds : 10 ,
@@ -3084,7 +3084,7 @@ func testCustomChannelsLiquidityEdgeCasesCore(ctx context.Context,
3084
3084
// manually generated, quote.
3085
3085
iResp , err := charlie .AddInvoice (ctx , & lnrpc.Invoice {
3086
3086
Memo : "" ,
3087
- Value : 200_000 ,
3087
+ Value : 30_000 ,
3088
3088
RPreimage : bytes .Repeat ([]byte {11 }, 32 ),
3089
3089
CltvExpiry : 60 ,
3090
3090
RouteHints : []* lnrpc.RouteHint {{
@@ -3099,11 +3099,22 @@ func testCustomChannelsLiquidityEdgeCasesCore(ctx context.Context,
3099
3099
// Now Erin tries to pay the invoice. Since rfq quote cannot satisfy the
3100
3100
// total amount of the invoice this payment will fail.
3101
3101
payInvoiceWithSatoshi (
3102
- t .t , erin , iResp , withPayErrSubStr ( "context deadline exceeded" ),
3103
- withFailure (lnrpc .Payment_FAILED , failureNone ),
3104
- withGroupKey (groupID ),
3102
+ t .t , erin , iResp ,
3103
+ withFailure (lnrpc .Payment_FAILED , failureNoRoute ),
3104
+ withGroupKey (groupID ), withSmallShards (),
3105
3105
)
3106
3106
3107
+ // Let's also cancel the invoice and assert that no HTLCs are still
3108
+ // in-flight.
3109
+ _ , err = charlie .InvoicesClient .CancelInvoice (
3110
+ ctx , & invoicesrpc.CancelInvoiceMsg {
3111
+ PaymentHash : iResp .RHash ,
3112
+ },
3113
+ )
3114
+ require .NoError (t .t , err )
3115
+
3116
+ assertNumHtlcs (t .t , dave , 0 )
3117
+
3107
3118
logBalance (t .t , nodes , assetID , "after small manual rfq" )
3108
3119
3109
3120
// Edge case: Fabia creates an invoice which Erin cannot satisfy with
0 commit comments