contractcourt/channel_arbitrator: stop block epoch on channel attendant exit

This commit is contained in:
Johan T. Halseth 2018-06-21 10:52:49 +01:00
parent 1c43a0cb36
commit d787e74125
No known key found for this signature in database
GPG Key ID: 15BAADA29DA20D26

@ -305,8 +305,6 @@ func (c *ChannelArbitrator) Stop() error {
close(c.quit) close(c.quit)
c.wg.Wait() c.wg.Wait()
c.cfg.BlockEpochs.Cancel()
return nil return nil
} }
@ -1293,7 +1291,10 @@ func (c *ChannelArbitrator) UpdateContractSignals(newSignals *ContractSignals) {
func (c *ChannelArbitrator) channelAttendant(bestHeight int32) { func (c *ChannelArbitrator) channelAttendant(bestHeight int32) {
// TODO(roasbeef): tell top chain arb we're done // TODO(roasbeef): tell top chain arb we're done
defer c.wg.Done() defer func() {
c.cfg.BlockEpochs.Cancel()
c.wg.Done()
}()
for { for {
select { select {