test: wait for 2 transactions to enter mempool at the end of testMultiHopHtlcRemoteChainClaim
In this commit, we fix an existing flake on Travis related to the new set of on-chain HTLC tests. In this timing flake, Bob would broadcast his sweeping transaction, but *mid block mining*. As a result, the output would never be properly swept, needing an additional block to be mined. We’ll now wait for both Bob’s sweeping transaction, and Carol’s sweep transaction to be confirmed before we attempt our assertions.
This commit is contained in:
2 files changed
+13
-9
No files matched your search
+1
-1
@@ -6233,7 +6233,7 @@ func testMultiHopHtlcRemoteChainClaim(net *lntest.NetworkHarness, t *harnessTest
|
||||
// With the block mined above, Bob should detect that Carol is
|
||||
// attempting to sweep the HTLC on-chain, and should obtain the
|
||||
// preimage.
|
||||
_, err = waitForTxInMempool(net.Miner.Node, time.Second*10)
|
||||
_, err = waitForNTxsInMempool(net.Miner.Node, 2, time.Second*15)
|
||||
if err != nil {
|
||||
t.Fatalf("unable to find bob's sweeping transaction")
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user