contractcourt: handle sweeping script-enforced leased channel outputs
In order to sweep the commitment and HTLC outputs belonging to a script-enforced leased channel, each resolver must know whether the additional CLTV clause on the channel initiator applies to them. To do so, we retrieve the historical channel state stored within the database and supplement it to the resolvers to provide them with what's needed in order to sweep the necessary outputs and resolve their respective contracts.
This commit is contained in:
1 parent
2f27fa370b
commit
5faf3dc03b
10 files changed
+232
-32
No files matched your search
@@ -192,6 +192,13 @@ func (c *anchorResolver) IsResolved() bool {
|
||||
return c.resolved
|
||||
}
|
||||
|
||||
// SupplementState allows the user of a ContractResolver to supplement it with
|
||||
// state required for the proper resolution of a contract.
|
||||
//
|
||||
// NOTE: Part of the ContractResolver interface.
|
||||
func (c *anchorResolver) SupplementState(_ *channeldb.OpenChannel) {
|
||||
}
|
||||
|
||||
// report returns a report on the resolution state of the contract.
|
||||
func (c *anchorResolver) report() *ContractReport {
|
||||
c.reportLock.Lock()
|
||||
|
||||
Reference in new issue
Block a user