lnd.xprv/contractcourt
Olaoluwa Osuntokun bdf1194835
contractcourt: detect local force closes based on commitment outputs
In this commit, we modify the way we detect local force closes. Before
this commit, we would directly check the broadcast commitment's txid
against what we know to be our best local commitment. In the case of DLP
recovery from an SCB, it's possible that the user force closed, _then_
attempted to recover their channels. As a result, we need to check the
outputs directly in order to also handle this rare, but
possible recovery scenario.

The new detection method uses the outputs to detect if it's a local
commitment or not. Based on the state number, we'll re-derive the
expected scripts, and check to see if they're on the commitment. If not,
then we know it's a remote force close. A new test has been added to
exercise this new behavior, ensuring we catch local closes where we have
and don't have a direct output.
2019-04-26 15:13:01 -07:00
..
briefcase_test.go cnct: use sweeper in commit resolver 2019-02-01 09:20:45 +01:00
briefcase.go multi: move Input interface and related code 2019-01-31 13:25:33 +01: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 cnct: define separate broadcast delta for outgoing htlcs 2019-04-05 11:36:07 +02:00
chain_watcher_test.go contractcourt: detect local force closes based on commitment outputs 2019-04-26 15:13:01 -07:00
chain_watcher.go contractcourt: detect local force closes based on commitment outputs 2019-04-26 15:13:01 -07:00
channel_arbitrator_test.go cnct: define separate broadcast delta for outgoing htlcs 2019-04-05 11:36:07 +02:00
channel_arbitrator.go cnct: log go to chain reason 2019-04-08 10:34:41 +02:00
commit_sweep_resolver.go cnct: fix error returning bug 2019-02-26 12:56:21 -03:00
contract_resolvers.go cnct: expose non-incubating htlcs after channel force close 2019-02-01 09:36:47 +01:00
htlc_incoming_contest_resolver.go htlcswitch: hodl invoice 2019-03-15 10:09:17 +01:00
htlc_outgoing_contest_resolver.go contractcourt: extract which timeout HTLC output to watch into new method 2019-03-19 16:50:09 -07:00
htlc_success_resolver.go htlcswitch: hodl invoice 2019-03-15 10:09:17 +01:00
htlc_timeout_resolver_test.go contractcourt: add new set of tests in htlcTimeoutResolver to exercise refactorings 2019-03-19 16:50:28 -07:00
htlc_timeout_resolver.go contractcourt: simplify htlcTimeoutResolver, unify with HTLC contest logic 2019-03-19 16:50:27 -07:00
log.go multi: init subsystem loggers via build pkg 2018-10-05 13:04:45 +09:00