mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-01-19 05:45:21 +01:00
contractcourt: add complete ContractResolver implementations
In this commit, we introduce a new interface, the ContractResolver. The duty of a ContractResolver is to watch a contract on-chain, for all possible transitions, and exit finally when the contract has been fully resolved. Resolvers themselves can be recursive: meaning producing another resolver to hand off the duties require to fully resolve a contract. Each resolver also has a ResolverKit which contains all the function closures and interfaces that the resolver need to properly do its job. The 5 types of resolvers are: * outgoing HTLC timeout * outgoing HTLC contested * incoming HTLC know presage * incoming HTLC contested (don’t yet know) * commitment sweep In the future, more advanced resolver types can be added as required.
This commit is contained in:
parent
701eb9d4f4
commit
09b6bee8d4
1461
contractcourt/contract_resolvers.go
Normal file
1461
contractcourt/contract_resolvers.go
Normal file
File diff suppressed because it is too large
Load Diff
1
contractcourt/contract_resolvers_test.go
Normal file
1
contractcourt/contract_resolvers_test.go
Normal file
@ -0,0 +1 @@
|
||||
package contractcourt
|
Loading…
Reference in New Issue
Block a user