From 3a454923983833f60772b0ffb5cd41cd6c05bf89 Mon Sep 17 00:00:00 2001 From: yyforyongyu Date: Tue, 29 Oct 2024 16:05:06 +0800 Subject: [PATCH] itest: fix spawning temp miner --- itest/lnd_open_channel_test.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/itest/lnd_open_channel_test.go b/itest/lnd_open_channel_test.go index 13a581921..66930a6c2 100644 --- a/itest/lnd_open_channel_test.go +++ b/itest/lnd_open_channel_test.go @@ -29,14 +29,17 @@ func testOpenChannelAfterReorg(ht *lntest.HarnessTest) { ht.Skipf("skipping reorg test for neutrino backend") } - // Create a temp miner. - tempMiner := ht.SpawnTempMiner() - miner := ht.Miner() alice := ht.NewNodeWithCoins("Alice", nil) bob := ht.NewNode("Bob", nil) ht.EnsureConnected(alice, bob) + // Create a temp miner after the creation of Alice. + // + // NOTE: this is needed since NewNodeWithCoins will mine a block and + // the temp miner needs to sync up. + tempMiner := ht.SpawnTempMiner() + // Create a new channel that requires 1 confs before it's considered // open, then broadcast the funding transaction params := lntest.OpenChannelParams{