test_utils: waitgroup manually spawned goroutines

Found that his can sometimes cause a panic with a
negative waitgroup counter.
This commit is contained in:
Conner Fromknecht 2019-02-14 17:13:33 -08:00
parent ef41fc6249
commit 8b185e6301
No known key found for this signature in database
GPG Key ID: E7D737B67FA592C7

@ -394,6 +394,7 @@ func createTestPeer(notifier chainntnfs.ChainNotifier,
chanID := lnwire.NewChanIDFromOutPoint(channelAlice.ChannelPoint())
alicePeer.activeChannels[chanID] = channelAlice
alicePeer.wg.Add(1)
go alicePeer.channelManager()
return alicePeer, channelAlice, channelBob, cleanUpFunc, nil