|
48 | 48 | shortTimeout = time.Second * 5 |
49 | 49 |
|
50 | 50 | defaultPaymentStatus = fn.None[lnrpc.Payment_PaymentStatus]() |
| 51 | + |
| 52 | + // nolint: lll |
| 53 | + errNoBalance = lnrpc.PaymentFailureReason_FAILURE_REASON_INSUFFICIENT_BALANCE |
| 54 | + errNoRoute = lnrpc.PaymentFailureReason_FAILURE_REASON_NO_ROUTE |
| 55 | + errIncorrectDetails = lnrpc.PaymentFailureReason_FAILURE_REASON_INCORRECT_PAYMENT_DETAILS |
51 | 56 | ) |
52 | 57 |
|
53 | 58 | var ( |
@@ -528,6 +533,7 @@ func testCustomChannels(_ context.Context, net *NetworkHarness, |
528 | 533 | ) |
529 | 534 | payInvoiceWithSatoshi( |
530 | 535 | t.t, charlie, invoiceResp, lnrpc.Payment_FAILED, |
| 536 | + fn.Some(errIncorrectDetails), |
531 | 537 | ) |
532 | 538 | logBalance(t.t, nodes, assetID, "after asset invoice paid with sats") |
533 | 539 |
|
@@ -574,7 +580,10 @@ func testCustomChannels(_ context.Context, net *NetworkHarness, |
574 | 580 | invoiceResp = createAssetInvoice( |
575 | 581 | t.t, erin, fabia, fabiaInvoiceAssetAmount2, assetID, |
576 | 582 | ) |
577 | | - payInvoiceWithSatoshi(t.t, dave, invoiceResp, lnrpc.Payment_SUCCEEDED) |
| 583 | + payInvoiceWithSatoshi( |
| 584 | + t.t, dave, invoiceResp, lnrpc.Payment_SUCCEEDED, |
| 585 | + fn.None[lnrpc.PaymentFailureReason](), |
| 586 | + ) |
578 | 587 | logBalance(t.t, nodes, assetID, "after invoice") |
579 | 588 |
|
580 | 589 | erinAssetBalance -= fabiaInvoiceAssetAmount2 |
@@ -1006,7 +1015,10 @@ func testCustomChannelsGroupedAsset(_ context.Context, net *NetworkHarness, |
1006 | 1015 | invoiceResp = createAssetInvoice( |
1007 | 1016 | t.t, erin, fabia, fabiaInvoiceAssetAmount2, assetID, |
1008 | 1017 | ) |
1009 | | - payInvoiceWithSatoshi(t.t, dave, invoiceResp, lnrpc.Payment_SUCCEEDED) |
| 1018 | + payInvoiceWithSatoshi( |
| 1019 | + t.t, dave, invoiceResp, lnrpc.Payment_SUCCEEDED, |
| 1020 | + fn.None[lnrpc.PaymentFailureReason](), |
| 1021 | + ) |
1010 | 1022 | logBalance(t.t, nodes, assetID, "after invoice") |
1011 | 1023 |
|
1012 | 1024 | erinAssetBalance -= fabiaInvoiceAssetAmount2 |
@@ -2015,7 +2027,10 @@ func testCustomChannelsLiquidityEdgeCases(_ context.Context, |
2015 | 2027 | // channels, where the total asset value is less than the default anchor |
2016 | 2028 | // amount of 354 sats. |
2017 | 2029 | invoiceResp = createAssetInvoice(t.t, dave, charlie, 1, assetID) |
2018 | | - payInvoiceWithSatoshi(t.t, yara, invoiceResp, lnrpc.Payment_FAILED) |
| 2030 | + payInvoiceWithSatoshi( |
| 2031 | + t.t, yara, invoiceResp, lnrpc.Payment_FAILED, |
| 2032 | + fn.Some(errNoRoute), |
| 2033 | + ) |
2019 | 2034 |
|
2020 | 2035 | logBalance(t.t, nodes, assetID, "after small payment (asset "+ |
2021 | 2036 | "invoice, <354sats)") |
@@ -2686,7 +2701,7 @@ func testCustomChannelsOraclePricing(_ context.Context, |
2686 | 2701 | ) |
2687 | 2702 | } |
2688 | 2703 |
|
2689 | | -// testCustomChannelsFee tests the whether the custom channel funding process |
| 2704 | +// testCustomChannelsFee tests whether the custom channel funding process |
2690 | 2705 | // fails if the proposed fee rate is lower than the minimum relay fee. |
2691 | 2706 | func testCustomChannelsFee(_ context.Context, |
2692 | 2707 | net *NetworkHarness, t *harnessTest) { |
|
0 commit comments