lnrpc: ensure parsing of the Amp flag for payments is consistent
In this commit, we fix an inconsistent in the API related to AMP payments. When a payment request isn't specified, we require the `--amp` flag on the CLI to make an AMP payment. However, for payment requests, we don't require this flag. To fix this inconsistency, we now require the `--amp` flag to _also_ be set for payment requests.
This commit is contained in:
4 files changed
+52
-3
No files matched your search
@@ -129,6 +129,7 @@ func testSendPaymentAMPInvoiceCase(ht *lntest.HarnessTest,
|
||||
PaymentAddr: externalPayAddr,
|
||||
TimeoutSeconds: 60,
|
||||
FeeLimitMsat: noFeeLimitMsat,
|
||||
Amp: true,
|
||||
}
|
||||
payment := ht.SendPaymentAssertSettled(mts.alice, sendReq)
|
||||
|
||||
@@ -252,6 +253,7 @@ func testSendPaymentAMPInvoiceRepeat(ht *lntest.HarnessTest) {
|
||||
// Now we'll use Carol to pay the invoice that Dave created.
|
||||
ht.CompletePaymentRequests(
|
||||
carol, []string{addInvoiceResp.PaymentRequest},
|
||||
lntest.WithAMP(),
|
||||
)
|
||||
|
||||
// Dave should get a notification that the invoice has been settled.
|
||||
@@ -274,6 +276,7 @@ func testSendPaymentAMPInvoiceRepeat(ht *lntest.HarnessTest) {
|
||||
// has received another payment.
|
||||
ht.CompletePaymentRequests(
|
||||
carol, []string{addInvoiceResp.PaymentRequest},
|
||||
lntest.WithAMP(),
|
||||
)
|
||||
|
||||
// Dave should get another notification.
|
||||
|
||||
Reference in new issue
Block a user