contractcourt/[incoming|outgoing]_contest_resolver: make inner resolver pointer

To make the linter happy, make a pointer to the inner resolver.
Otherwise the linter would complain with

copylocks: literal copies lock value

since we'll add a mutex to the resolver in following commits.
This commit is contained in:
Johan T. Halseth committed 2020-12-10 14:24:19 +01:00
1 parent 4da2b290f9
commit 9b08ef6d4e
5 files changed
+19 -19

No files matched your search

@@ -17,7 +17,7 @@ import (
type htlcOutgoingContestResolver struct {
// htlcTimeoutResolver is the inner solver that this resolver may turn
// into. This only happens if the HTLC expires on-chain.
htlcTimeoutResolver
*htlcTimeoutResolver
}
// newOutgoingContestResolver instantiates a new outgoing contested htlc
@@ -31,7 +31,7 @@ func newOutgoingContestResolver(res lnwallet.OutgoingHtlcResolution,
)
return &htlcOutgoingContestResolver{
htlcTimeoutResolver: *timeout,
htlcTimeoutResolver: timeout,
}
}
@@ -131,7 +131,7 @@ func (h *htlcOutgoingContestResolver) Resolve() (ContractResolver, error) {
"into timeout resolver", h,
h.htlcResolution.ClaimOutpoint,
newHeight, h.htlcResolution.Expiry)
return &h.htlcTimeoutResolver, nil
return h.htlcTimeoutResolver, nil
}
// The output has been spent! This means the preimage has been
@@ -209,7 +209,7 @@ func newOutgoingContestResolverFromReader(r io.Reader, resCfg ResolverConfig) (
if err != nil {
return nil, err
}
h.htlcTimeoutResolver = *timeoutResolver
h.htlcTimeoutResolver = timeoutResolver
return h, nil
}