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.
This commit is contained in:
Olaoluwa Osuntokun 2018-03-30 14:53:05 -07:00
parent 8d71ed2f64
commit 2526827b6d
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21

@ -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)
}