peer: stop a channel's goroutines within wipeChannel

This commit is contained in:
Olaoluwa Osuntokun 2017-05-14 19:21:17 -07:00
parent 9c685433f3
commit 7df1d75267
No known key found for this signature in database
GPG Key ID: 9CC5B105D03521A2

@ -1094,6 +1094,8 @@ func waitForChanToClose(bestHeight uint32, notifier chainntnfs.ChainNotifier,
// wipeChannel removes the passed channel from all indexes associated with the
// peer, and deletes the channel from the database.
func wipeChannel(p *peer, channel *lnwallet.LightningChannel) error {
channel.Stop()
chanID := lnwire.NewChanIDFromOutPoint(channel.ChannelPoint())
p.activeChanMtx.Lock()