lnd.xprv/contractcourt
Olaoluwa Osuntokun d0df5a4ddd
contractcourt: supplement resolvers with confirmed commit set HTLCs
In this commit, we fix an existing bug in the package, causing
resolutions to be restarted without their required supplementary
information. This can happen if a distinct HTLC set gets confirmed
compared to the HTLCs that we may have had our commitment at time of
close. Due to this bug, on restart certain HTLCS would be rejected as
they would present their state to the invoice registry, but be rejected
due to checks such as amount value.

To fix this, we'll now pass in the set of confirmed HTLCs into the
resolvers when we re-launch them, giving us access to all the
information we need to supplement the HTLCS.

We also add a new test that ensures that the proper fields of a resolver
are set after a restart.
2019-09-25 16:05:25 -07:00
..
briefcase_test.go routing: Fix dropped errors in tests. 2019-09-13 06:28:05 +00:00
briefcase.go multi: fix dropped errors 2019-09-13 09:50:38 +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: write confirmed CommitSet to disk before MarkChannelClosed 2019-05-27 15:26:46 -07:00
chain_watcher_test.go multi: address lingering TODO by no longer wiping out local HTLCs on remote close 2019-05-27 14:34:13 -07:00
chain_watcher.go contractcourt: add new checkLocalChainActions method use in main state step 2019-05-27 15:26:36 -07:00
channel_arbitrator_test.go contractcourt: supplement resolvers with confirmed commit set HTLCs 2019-09-25 16:05:25 -07:00
channel_arbitrator.go contractcourt: supplement resolvers with confirmed commit set HTLCs 2019-09-25 16:05:25 -07:00
commit_sweep_resolver.go cnct: do not log resolver shutting down as error 2019-09-11 15:54:41 +02:00
contract_resolvers.go cnct: do not log resolver shutting down as error 2019-09-11 15:54:41 +02:00
htlc_incoming_contest_resolver.go cnct: do not log resolver shutting down as error 2019-09-11 15:54:41 +02:00
htlc_incoming_resolver_test.go htlcswitch+invoices: circuit key based hodl notifications 2019-09-16 10:10:14 +02:00
htlc_outgoing_contest_resolver.go cnct: do not log resolver shutting down as error 2019-09-11 15:54:41 +02:00
htlc_success_resolver.go cnct: do not log resolver shutting down as error 2019-09-11 15:54:41 +02:00
htlc_timeout_resolver_test.go cnct/test: extend mockWitnessBeacon 2019-05-15 14:42:15 +02:00
htlc_timeout_resolver.go cnct: do not log resolver shutting down as error 2019-09-11 15:54:41 +02:00
interfaces.go multi: use separate cltv expiry field from invoice 2019-09-04 19:20:19 +02:00
log.go multi: init subsystem loggers via build pkg 2018-10-05 13:04:45 +09:00
mock_registry_test.go multi: use separate cltv expiry field from invoice 2019-09-04 19:20:19 +02:00
utils_test.go cnct/test: add incoming contest resolver test 2019-05-15 14:42:18 +02:00