lnd.xprv/contractcourt
Johan T. Halseth ac49031396
chainwatcher: only continue breach handling after successfully marked
closed

This commit makes the handoff procedure between the breachabiter and
chainwatcher use a function closure to mark the channel pending closed
in the DB. Doing it this way we know that the channel has been markd
pending closed in the DB when ProcessACK returns.

The reason we do this is that we really need a "two-way ACK" to have the
breacharbiter know it can go on with the breach handling. Earlier it
would just send the ACK on the channel and continue. This lead to a race
where breach handling could finish before the chain watcher had marked
the channel pending closed in the database, which again lead to the
breacharbiter failing to mark the channel fully closed.

We saw this causing flakes during itests.
2021-05-06 12:37:11 +02:00
..
anchor_resolver.go cnct: cpfp-sweep anchors 2020-09-17 12:30:41 +02:00
briefcase_test.go lntest/channels: introduce subpackage to deduplicate static structs 2021-01-25 14:04:39 -05:00
briefcase.go input+lnwallet+contractcourt: define SignDetails for HTLC resolutions 2020-12-10 14:24:18 +01:00
chain_arbitrator_test.go multi: move mockChainIO, mockNotifier to lntest/mock 2020-08-31 19:41:09 -04:00
chain_arbitrator.go chainwatcher: only continue breach handling after successfully marked 2021-05-06 12:37:11 +02:00
chain_watcher_test.go contractcourt/chainwatcher test: add test cases for future force close 2020-12-03 08:01:08 +01:00
chain_watcher.go chainwatcher: only continue breach handling after successfully marked 2021-05-06 12:37:11 +02:00
channel_arbitrator_test.go kvdb: add timeout options for bbolt (#4787) 2020-12-07 15:31:49 -08:00
channel_arbitrator.go contractcourt: get arbitrator state before we start each arbitrator 2020-11-12 15:32:15 +02:00
commit_sweep_resolver_test.go contractcourt: revamp HTLC success unit test 2020-12-10 14:24:20 +01:00
commit_sweep_resolver.go contractcourt/succes+timeout resolver: extract waitForSpend logic 2020-12-10 14:24:19 +01:00
contract_resolvers.go contraccourt+input: create HtlcSecondLevelAnchorInput and resolver for 2020-12-10 14:24:20 +01:00
htlc_incoming_contest_resolver.go contractcourt/[incoming|outgoing]_contest_resolver: make inner resolver pointer 2020-12-10 14:24:19 +01:00
htlc_incoming_resolver_test.go contractcourt/[incoming|outgoing]_contest_resolver: make inner resolver pointer 2020-12-10 14:24:19 +01:00
htlc_outgoing_contest_resolver_test.go contractcourt/[incoming|outgoing]_contest_resolver: make inner resolver pointer 2020-12-10 14:24:19 +01:00
htlc_outgoing_contest_resolver.go contractcourt/[incoming|outgoing]_contest_resolver: make inner resolver pointer 2020-12-10 14:24:19 +01:00
htlc_success_resolver_test.go contractcourt/htlc_timeout_test: expand timeout tests 2020-12-10 14:24:20 +01:00
htlc_success_resolver.go contraccourt+input: create HtlcSecondLevelAnchorInput and resolver for 2020-12-10 14:24:20 +01:00
htlc_timeout_resolver_test.go contractcourt/htlc_timeout_test: expand timeout tests 2020-12-10 14:24:20 +01:00
htlc_timeout_resolver.go contraccourt+input: create resolver for timeout second level 2020-12-10 14:24:20 +01:00
interfaces.go cnct: resolve anchors post-confirmation 2020-03-18 12:27:01 +01:00
log.go multi: init subsystem loggers via build pkg 2018-10-05 13:04:45 +09:00
mock_registry_test.go multi: replace htlcResolution with an interface 2020-02-06 19:41:36 +02:00
utils_test.go contractcourt/chain_watcher test: do proper state rollback 2020-12-03 08:00:02 +01:00