contractcourt: unify the lease specific HTLC sweeping logic
In this commit, we consolidate the _lease specific_ logic for the success and timeout HTLC resolvers. We do this with the addition of a new struct which is then composed via struct embedding with the two existing structs. This fixes a flake in the integration tests by ensuring the height is set up front, rather than eventually once the height matches the lock time.
This commit is contained in:
7 files changed
+127
-95
No files matched your search
@@ -439,13 +439,6 @@ func (h *htlcIncomingContestResolver) Supplement(htlc channeldb.HTLC) {
|
||||
h.htlc = htlc
|
||||
}
|
||||
|
||||
// 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 (h *htlcIncomingContestResolver) SupplementState(_ *channeldb.OpenChannel) {
|
||||
}
|
||||
|
||||
// decodePayload (re)decodes the hop payload of a received htlc.
|
||||
func (h *htlcIncomingContestResolver) decodePayload() (*hop.Payload,
|
||||
[]byte, error) {
|
||||
|
||||
Reference in new issue
Block a user