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:
Wilmer Paulino
2021-07-14 16:07:36 -07:00
committed by Olaoluwa Osuntokun
parent 2f27fa370b
commit 5faf3dc03b
10 changed files with 232 additions and 32 deletions

View File

@@ -379,6 +379,9 @@ func createTestChannelArbitrator(t *testing.T, log ArbitratorLog,
return nil
},
FetchHistoricalChannel: func() (*channeldb.OpenChannel, error) {
return &channeldb.OpenChannel{}, nil
},
}
// Apply all custom options to the config struct.