lnd.xprv/contractcourt
Joost Jager 6886a0117f
cnct: always create incoming contest resolver
One of the first things the incoming contest resolver does is checking
if the preimage is available and if it is, convert itself into a success
resolver.

This behaviour makes it unnecessary to already determine earlier in the
process whether an incoming contest or a success resolver is needed.

By having all incoming htlcs go through the incoming contest resolver,
the number of execution paths is reduced and it becomes easier to
ascertain that the implemented logic is correct.

The only functional change in this commit is that a forwarded htlc for
which is the preimage is known, is no longer settled when the htlc is
already expired. Previously a success resolver would be instantiated
directly, skipping the expiry height check.

This created a risk that the success resolver would never finish,
because an expired htlc could already have been swept by the remote
party and there is no detection of this remote spend in the success
resolver currently.

With the new change, the general direction that an expired htlc
shouldn't be settled and instead given up on is implemented more
consistently.

This commit prepares for fixing edges cases related to hodl
invoice on-chain resolution.
2019-05-15 14:41:47 +02: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 Merge pull request #3044 from cfromknecht/spelling-fixes 2019-05-07 08:50:36 +02: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 lnwallet: make BlockChainIO.GetUTXO take cancel chan 2019-05-09 14:44:47 +02:00
channel_arbitrator.go cnct: always create incoming contest resolver 2019-05-15 14:41:47 +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 cnct: always create incoming contest resolver 2019-05-15 14:41:47 +02: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