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 committed 2019-02-14 17:13:33 -08:00
1 parent ef41fc6249
commit 8b185e6301
1 file changed
+1
+1
View File
@@ -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