From 41c207e247048f8db1b4cc2f5284f92e87fd14f3 Mon Sep 17 00:00:00 2001 From: Joost Jager Date: Mon, 6 Jan 2020 15:29:45 +0100 Subject: [PATCH] lnwallet/test: describe existing bug after restart with dangling remote updates --- lnwallet/channel_test.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lnwallet/channel_test.go b/lnwallet/channel_test.go index 665917cf..bddb3cda 100644 --- a/lnwallet/channel_test.go +++ b/lnwallet/channel_test.go @@ -6178,7 +6178,12 @@ func TestChannelRestoreUpdateLogsFailedHTLC(t *testing.T) { // At this point Alice has advanced her local commitment chain to a // commitment with no HTLCs left. The current state on her remote // commitment chain, however, still has the HTLC active, as she hasn't - // sent a new signature yet. + // sent a new signature yet. If we'd now restart and restore, the htlc + // failure update should still be waiting for inclusion in Alice's next + // signature. Otherwise the produced signature would be invalid. + // + // THIS IS NOT HAPPENING. The update log entry is dropped after a + // restart! assertInLogs(t, aliceChannel, 1, 0, 0, 1) restoreAndAssert(t, aliceChannel, 1, 0, 0, 0)