From 1208c66a89215e8c57914df9f03836715237e088 Mon Sep 17 00:00:00 2001 From: "Johan T. Halseth" Date: Mon, 29 Oct 2018 05:52:09 +0100 Subject: [PATCH] lnd_test: mine reorged out funding tx --- lnd_test.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lnd_test.go b/lnd_test.go index 3ff09185e..48e53803c 100644 --- a/lnd_test.go +++ b/lnd_test.go @@ -1561,7 +1561,16 @@ func testOpenChannelAfterReorg(net *lntest.NetworkHarness, t *harnessTest) { numEdges) } - ctxt, _ = context.WithTimeout(ctxb, timeout) + // Cleanup by mining the funding tx again, then closing the channel. + _, err = waitForTxInMempool(net.Miner.Node, minerMempoolTimeout) + if err != nil { + t.Fatalf("failed to find funding tx in mempool: %v", err) + } + + block = mineBlocks(t, net, 1)[0] + assertTxInBlock(t, block, fundingTxID) + + ctxt, _ = context.WithTimeout(ctxb, channelCloseTimeout) closeChannelAndAssert(ctxt, t, net, net.Alice, chanPoint, false) }