mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-10-10 06:52:41 +02:00
test: ensure the WaitForBlockchainSync grouting always exits
This commit fixes a minor bug in the goroutine that’s launched to check the sync status of a particular node. Previously, the goroutine could end up infinitely stuck on a send as once the chain has been detected as synced, it didn't exit. We fix this now by ensure that the goroutine always terminates after the initial notification to the caller. Additionally, we not ensure that both the internal and exterior goroutine are both reading off of the peer’s quit channel.
This commit is contained in:
@@ -416,7 +416,7 @@ func testDisconnectingTargetPeer(net *networkHarness, t *harnessTest) {
|
||||
|
||||
// At this point, the channel should be fully opened and there should
|
||||
// be no pending channels remaining for either node.
|
||||
time.Sleep(time.Millisecond * 3000)
|
||||
time.Sleep(time.Millisecond * 300)
|
||||
ctxt, _ = context.WithTimeout(ctxb, timeout)
|
||||
|
||||
assertNumOpenChannelsPending(ctxt, t, net.Alice, net.Bob, 0)
|
||||
|
Reference in New Issue
Block a user