4320421110
This commit makes clients subscribing to channel events that are marked "sync dispatch" _not_ being deleted from the list of clients when they call Cancel(). Instead a go routine will be launched that will send an error on every read of the ProcessACK channel. This fixes a race in handing off the breach info while lnd was shutting down. The breach arbiter could end up being shut down (and calling Cancel()) before while the ChainWatcher was in the process of dispatching a breach. Since the breach arbiter no longer was among the registered clients at this point, the ChainWatcher would assume the breach was handed off successfully, and mark the channel as pending closed. When lnd now was restarted, the breach arbiter would not know about the breach, and the ChainWatcher wouldn't attempt to re-dispatch, as it was already marked as pending closed. |
||
---|---|---|
.. | ||
briefcase_test.go | ||
briefcase.go | ||
chain_arbitrator_test.go | ||
chain_arbitrator.go | ||
chain_watcher.go | ||
channel_arbitrator_test.go | ||
channel_arbitrator.go | ||
contract_resolvers_test.go | ||
contract_resolvers.go | ||
log.go |