Skip to content

Commit 6221457

Browse files
committed
itest: add invoice with existing route hints edge case
1 parent 89eca6e commit 6221457

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

itest/litd_custom_channels_test.go

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2949,6 +2949,43 @@ func testCustomChannelsLiquidityEdgeCasesCore(ctx context.Context,
29492949
payInvoiceWithSatoshi(
29502950
t.t, dave, invoiceResp, withFeeLimit(100_000_000),
29512951
)
2952+
2953+
logBalance(t.t, nodes, assetID, "after policy checks")
2954+
2955+
resBuy, err := daveTap.RfqClient.AddAssetBuyOrder(
2956+
ctx, &rfqrpc.AddAssetBuyOrderRequest{
2957+
AssetSpecifier: &assetSpecifier,
2958+
AssetMaxAmt: 1_000,
2959+
Expiry: uint64(inOneHour.Unix()),
2960+
PeerPubKey: charlie.PubKey[:],
2961+
TimeoutSeconds: 100,
2962+
},
2963+
)
2964+
require.NoError(t.t, err)
2965+
2966+
scid := resBuy.GetAcceptedQuote().Scid
2967+
2968+
invResp := createAssetInvoice(
2969+
t.t, charlie, dave, 1_000, assetID,
2970+
withInvGroupKey(groupID), withRouteHints([]*lnrpc.RouteHint{
2971+
&lnrpc.RouteHint{
2972+
HopHints: []*lnrpc.HopHint{
2973+
&lnrpc.HopHint{
2974+
NodeId: charlie.PubKeyStr,
2975+
ChanId: scid,
2976+
},
2977+
},
2978+
},
2979+
}),
2980+
)
2981+
2982+
payInvoiceWithAssets(
2983+
t.t, charlie, dave, invResp.PaymentRequest, assetID,
2984+
withGroupKey(groupID),
2985+
)
2986+
2987+
logBalance(t.t, nodes, assetID, "after invoice with route hints")
2988+
29522989
}
29532990

29542991
// testCustomChannelsLiquidityEdgeCases is a test that runs through some

0 commit comments

Comments
 (0)