From ea4bb5dc5ce1a028811617ecd74197f296890c32 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Wed, 4 Nov 2020 11:03:34 +0100 Subject: [PATCH] itest: fix chanbackup restore flake Updating the fee of the mock estimator _after_ starting carol turned out to be flaky and could lead to the new fee not being picked up in time for the force close. That lead to carol not cpfp'ing the force closed transaction. --- lntest/itest/lnd_channel_backup_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lntest/itest/lnd_channel_backup_test.go b/lntest/itest/lnd_channel_backup_test.go index 5a8bf87dc..2a7e0eb6c 100644 --- a/lntest/itest/lnd_channel_backup_test.go +++ b/lntest/itest/lnd_channel_backup_test.go @@ -1012,6 +1012,10 @@ func testChanRestoreScenario(t *harnessTest, net *lntest.NetworkHarness, require.Contains(t.t, err.Error(), "cannot close channel with state: ") require.Contains(t.t, err.Error(), "ChanStatusRestored") + // Increase the fee estimate so that the following force close tx will + // be cpfp'ed in case of anchor commitments. + net.SetFeeEstimate(30000) + // Now that we have ensured that the channels restored by the backup are // in the correct state even without the remote peer telling us so, // let's start up Carol again.