Skip to content

Commit 8c6e243

Browse files
aakselrodRoasbeef
authored andcommitted
itest: check that AMP subinvoices are correctly updated w/nativesql
1 parent e152a52 commit 8c6e243

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

itest/lnd_amp_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,8 @@ func testSendPaymentAMPInvoiceRepeat(ht *lntest.HarnessTest) {
260260
invoiceNtfn := ht.ReceiveInvoiceUpdate(invSubscription)
261261

262262
// The notification should signal that the invoice is now settled, and
263-
// should also include the set ID, and show the proper amount paid.
263+
// should also include the set ID, show the proper amount paid, and have
264+
// the correct settle index and time.
264265
require.True(ht, invoiceNtfn.Settled)
265266
require.Equal(ht, lnrpc.Invoice_SETTLED, invoiceNtfn.State)
266267
require.Equal(ht, paymentAmt, int(invoiceNtfn.AmtPaidSat))
@@ -270,6 +271,9 @@ func testSendPaymentAMPInvoiceRepeat(ht *lntest.HarnessTest) {
270271
firstSetID, _ = hex.DecodeString(setIDStr)
271272
require.Equal(ht, lnrpc.InvoiceHTLCState_SETTLED,
272273
ampState.State)
274+
require.GreaterOrEqual(ht, ampState.SettleTime,
275+
rpcInvoice.CreationDate)
276+
require.Equal(ht, uint64(1), ampState.SettleIndex)
273277
}
274278

275279
// Pay the invoice again, we should get another notification that Dave

0 commit comments

Comments
 (0)