lnd/contractcourt
yyforyongyu 556c38fefd
contractcourt+lnd: watch for preimage reveal in mempool
This commit extends the current htlc timeout resolver to also watch for
preimage spend in mempool for a full node backend.

If mempool enabled, the resolver will watch the spend of the htlc output
in mempool and blocks **concurrently**, as if they are independent.

Ideally, a transaction will first appear in mempool then in a block.
However, there's no guarantee it will appear in **our** mempool since
there's no global mempool, thus we need to watch the spend in two places
in case it doesn't go through our mempool.

The current design favors the spend event found in blocks, that is, when
the tx is confirmed, we'd abort the monitoring and conitnue since the
outpoint cannot be double spent and re-appear in mempool again. This is
not true in the rare case of reorg, and we will handle reorg seperately.
2023-04-19 01:18:19 +08:00
..
anchor_resolver.go multi: use btcd's btcec/v2 and btcutil modules 2022-03-09 19:02:37 +01:00
breach_resolver.go server+contractcourt: add breachResolver that subscribes to breacharbiter 2022-01-25 15:42:20 -05:00
breacharbiter_test.go multi: add new build tag integration 2023-02-23 21:56:09 +08:00
breacharbiter.go contractcourt: the breach arb now uses P2TR outputs for sweep addrs 2022-08-11 17:26:10 -07:00
briefcase_test.go contractcourt: use T.TempDir to create temporary test directory 2022-08-24 08:58:16 +08:00
briefcase.go multi: use btcd's btcec/v2 and btcutil modules 2022-03-09 19:02:37 +01:00
chain_arbitrator_test.go multi: replace defer cleanup with t.Cleanup 2022-10-13 17:46:54 +08:00
chain_arbitrator.go contractcourt+lnd: watch for preimage reveal in mempool 2023-04-19 01:18:19 +08:00
chain_watcher_test.go multi: replace defer cleanup with t.Cleanup 2022-10-13 17:46:54 +08:00
chain_watcher.go multi: enhance loggings and fix logging format 2023-02-23 21:56:08 +08:00
channel_arbitrator_test.go htlcswitch: add final htlc event to notifier 2022-10-27 16:42:36 +02:00
channel_arbitrator.go multi: break invoice depenency on channeldb 2023-01-16 07:31:09 -08:00
commit_sweep_resolver_test.go multi: replace defer cleanup with t.Cleanup 2022-10-13 17:46:54 +08:00
commit_sweep_resolver.go multi: use btcd's btcec/v2 and btcutil modules 2022-03-09 19:02:37 +01:00
contract_resolvers.go contractcourt: handle sweeping script-enforced leased channel outputs 2021-10-19 18:30:37 -07:00
htlc_incoming_contest_resolver.go multi: create channeldb/models package 2023-01-16 07:14:55 -08:00
htlc_incoming_resolver_test.go multi: create channeldb/models package 2023-01-16 07:14:55 -08:00
htlc_lease_resolver.go contractcourt: unify the lease specific HTLC sweeping logic 2022-06-01 16:42:33 -07:00
htlc_outgoing_contest_resolver_test.go contractcourt: return htlcResolution when currentHeight has reached expiry 2022-10-27 01:11:35 +08:00
htlc_outgoing_contest_resolver.go contractcourt: return htlcResolution when currentHeight has reached expiry 2022-10-27 01:11:35 +08:00
htlc_success_resolver_test.go htlcswitch: add final htlc event to notifier 2022-10-27 16:42:36 +02:00
htlc_success_resolver.go multi: create channeldb/models package 2023-01-16 07:14:55 -08:00
htlc_timeout_resolver_test.go multi: replace defer cleanup with t.Cleanup 2022-10-13 17:46:54 +08:00
htlc_timeout_resolver.go contractcourt+lnd: watch for preimage reveal in mempool 2023-04-19 01:18:19 +08:00
interfaces.go multi: break invoice depenency on channeldb 2023-01-16 07:31:09 -08:00
log.go multi: move breach arbiter and utxo nursery into contractcourt package 2021-09-27 19:10:31 -07:00
mock_htlcnotifier_test.go multi: create channeldb/models package 2023-01-16 07:14:55 -08:00
mock_registry_test.go multi: break invoice depenency on channeldb 2023-01-16 07:31:09 -08:00
nursery_store_test.go multi: add new build tag integration 2023-02-23 21:56:09 +08:00
nursery_store.go multi: fix linter issues 2022-07-14 09:30:53 +02:00
setup_test.go channeldb/test: test with postgres 2021-10-29 10:54:44 +02:00
utils_test.go multi: replace defer cleanup with t.Cleanup 2022-10-13 17:46:54 +08:00
utxonursery_test.go multi: add new build tag integration 2023-02-23 21:56:09 +08:00
utxonursery.go multi: fix make fmt 2022-08-23 22:10:24 +08:00