From 2526827b6d2700b094f6760202bb7063a5bc3043 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Fri, 30 Mar 2018 14:53:05 -0700 Subject: [PATCH] test: modify sphinx replay test to force close the final channel In this commit, we modify the sphinx replay test to actually force close that final channel. We do this, as otherwise, we'll now reject the co-op close attempt as the channel still has active HTLCs. --- lnd_test.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lnd_test.go b/lnd_test.go index 3fd20e6b3..36a2fcb49 100644 --- a/lnd_test.go +++ b/lnd_test.go @@ -2129,15 +2129,16 @@ func testSphinxReplayPersistence(net *lntest.NetworkHarness, t *harnessTest) { t.Fatalf("received payment error: %v", resp.PaymentError) } - // Since the payment failed, the balance should still be left unaltered. + // Since the payment failed, the balance should still be left + // unaltered. assertAmountSent(0) ctxt, _ = context.WithTimeout(ctxb, timeout) - closeChannelAndAssert(ctxt, t, net, carol, chanPoint, false) + closeChannelAndAssert(ctxt, t, net, carol, chanPoint, true) - // Finally, shutdown the nodes we created for the duration of the tests, - // only leaving the two seed nodes (Alice and Bob) within our test - // network. + // Finally, shutdown the nodes we created for the duration of the + // tests, only leaving the two seed nodes (Alice and Bob) within our + // test network. if err := net.ShutdownNode(carol); err != nil { t.Fatalf("unable to shutdown carol: %v", err) }