lnd.xprv/contractcourt
Olaoluwa Osuntokun 09b6bee8d4
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.
2018-01-22 19:19:36 -08:00
..
briefcase_test.go contractcourt: add new briefcase.go file to house persistent arbitrator state 2018-01-22 19:19:35 -08:00
briefcase.go contractcourt: add new briefcase.go file to house persistent arbitrator state 2018-01-22 19:19:35 -08:00
channel_arbitrator_test.go contractcourt: add new ChannelArbitrator struct 2018-01-22 19:19:34 -08:00
channel_arbitrator.go contractcourt: add new ChannelArbitrator struct 2018-01-22 19:19:34 -08:00
contract_resolvers_test.go contractcourt: add complete ContractResolver implementations 2018-01-22 19:19:36 -08:00
contract_resolvers.go contractcourt: add complete ContractResolver implementations 2018-01-22 19:19:36 -08:00
log.go contractcourt: create new package, add logger 2018-01-22 19:19:34 -08:00