Merge pull request #4996 from carlaKC/itest-privatehodl

itest: add coverage for hold invoices with hop hints
This commit is contained in:
Olaoluwa Osuntokun 2021-02-08 16:56:21 -08:00 committed by GitHub
commit 5cec468ff4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -13702,12 +13702,14 @@ func testHoldInvoicePersistence(net *lntest.NetworkHarness, t *harnessTest) {
t.Fatalf("unable to connect alice to carol: %v", err)
}
// Open a channel between Alice and Carol.
// Open a channel between Alice and Carol which is private so that we
// cover the addition of hop hints for hold invoices.
ctxt, _ = context.WithTimeout(ctxb, channelOpenTimeout)
chanPointAlice := openChannelAndAssert(
ctxt, t, net, net.Alice, carol,
lntest.OpenChannelParams{
Amt: chanAmt,
Private: true,
},
)
@ -13748,10 +13750,14 @@ func testHoldInvoicePersistence(net *lntest.NetworkHarness, t *harnessTest) {
for _, preimage := range preimages {
payHash := preimage.Hash()
// Make our invoices private so that we get coverage for adding
// hop hints.
invoiceReq := &invoicesrpc.AddHoldInvoiceRequest{
Memo: "testing",
Value: int64(payAmt),
Hash: payHash[:],
Private: true,
}
ctxt, _ = context.WithTimeout(ctxb, defaultTimeout)
resp, err := carol.AddHoldInvoice(ctxt, invoiceReq)