lnd.xprv/contractcourt
Johan T. Halseth 4320421110
contractcourt/chain_watcher: don't delete syncDispatch clients on Cancel()
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.
2018-04-25 09:37:26 +02:00
..
briefcase_test.go build+multi: switch from bolt to bbolt 2018-03-10 19:01:13 -08:00
briefcase.go contractcourt: define StateCommitmentBroadcasted 2018-04-25 09:37:22 +02:00
chain_arbitrator_test.go contractcourt: add new ChainArbitrator struct as central coordinator of package 2018-01-22 19:19:36 -08:00
chain_arbitrator.go contractcourt/chain_arbitrator: remove CloseChannel method from ChannelArbitrator config 2018-04-25 09:37:25 +02:00
chain_watcher.go contractcourt/chain_watcher: don't delete syncDispatch clients on Cancel() 2018-04-25 09:37:26 +02:00
channel_arbitrator_test.go contractcourt/channel_arbitrator test: add unit tests 2018-04-25 09:37:25 +02:00
channel_arbitrator.go contractcourt/channel_arbitrator: remove unused transationTrigger 2018-04-25 09:37:25 +02:00
contract_resolvers_test.go contractcourt: add complete ContractResolver implementations 2018-01-22 19:19:36 -08:00
contract_resolvers.go multi: fix typos in comments 2018-04-17 19:03:27 -07:00
log.go contractcourt: create new package, add logger 2018-01-22 19:19:34 -08:00