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:
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
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user