Commit graph

8 commits

Author SHA1 Message Date
yyforyongyu
d2e81a19fd
contractcourt: fix concurrent access to launched 2024-12-20 17:54:06 +08:00
yyforyongyu
4f5ccb8650
contractcourt: fix concurrent access to resolved
This commit makes `resolved` an atomic bool to avoid data race. This
field is now defined in `contractResolverKit` to avoid code duplication.
2024-12-20 17:54:06 +08:00
yyforyongyu
a98763494f
contractcourt: add Launch method to anchor/breach resolver
We will use this and its following commits to break the original
`Resolve` methods into two parts - the first part is moved to a new
method `Launch`, which handles sending a sweep request to the sweeper.
The second part remains in `Resolve`, which is mainly waiting for a
spending tx.

Breach resolver currently doesn't do anything in its `Launch` since the
sweeping of justice outputs are not handled by the sweeper yet.
2024-12-20 17:54:04 +08:00
yyforyongyu
1f2cfc6a60
contractcourt: add verbose logging in resolvers
We now put the outpoint in the resolvers's logging so it's easier to
debug.
2024-12-20 17:54:03 +08:00
yyforyongyu
e2e59bd90c
contractcourt: remove the immediate param used in Resolve
This `immediate` flag was added as a hack so during a restart, the
pending resolvers would offer the inputs to the sweeper and ask it to
sweep them immediately. This is no longer need due to `blockbeat`, as
now during restart, a block is always sent to all subsystems via the
flow `ChainArb` -> `ChannelArb` -> resolvers -> sweeper. Thus, when
there are pending inputs offered, they will be processed by the sweeper
immediately.
2024-12-20 17:54:02 +08:00
yyforyongyu
49cfb91af1
contractcourt: make sure sweep happens immediately on startup
This commit makes sure the time-sensitive outputs are swept immediately
during startup.
2024-04-19 21:33:39 +08:00
Keagan McClelland
bc3feba267 contractcourt+lnrpc+lnd: s/BreachArbiter/BreachArbitrator
Since we have two other examples of XArbitrator, we rename
BreachArbiter to BreachArbitrator to keep things consistent.
The aim is to reduce the amount of lore you need to know to
intuit where things are or what they do.
2024-02-06 13:32:47 -07:00
eugene
f99933fa69 server+contractcourt: add breachResolver that subscribes to breacharbiter
Introduces a breachResolver that subscribes to the breacharbiter to
determine if the final justice transaction has confirmed and can
clean itself up.
2022-01-25 15:42:20 -05:00