contractcourt: persist timed out incoming htlc resolver reports
Incoming htlcs that are timed out or failed (invalid htlc or invoice condition not met), save a single on chain resolution because we don't need to take any actions on them ourselves (we don't need to worry about 2 stage claims since this is the success path for our peer).
This commit is contained in:
3 files changed
+221
-97
No files matched your search
@@ -49,6 +49,9 @@ type ResolverType uint8
|
||||
const (
|
||||
// ResolverTypeAnchor represents a resolver for an anchor output.
|
||||
ResolverTypeAnchor ResolverType = 0
|
||||
|
||||
// ResolverTypeIncomingHtlc represents resolution of an incoming htlc.
|
||||
ResolverTypeIncomingHtlc ResolverType = 1
|
||||
)
|
||||
|
||||
// ResolverOutcome indicates the outcome for the resolver that that the contract
|
||||
@@ -64,6 +67,16 @@ const (
|
||||
// chain. This may be the case for anchors that we did not sweep, or
|
||||
// outputs that were not economical to sweep.
|
||||
ResolverOutcomeUnclaimed ResolverOutcome = 1
|
||||
|
||||
// ResolverOutcomeAbandoned indicates that we did not attempt to claim
|
||||
// an output on chain. This is the case for htlcs that we could not
|
||||
// decode to claim, or invoice which we fail when an attempt is made
|
||||
// to settle them on chain.
|
||||
ResolverOutcomeAbandoned ResolverOutcome = 2
|
||||
|
||||
// ResolverOutcomeTimeout indicates that a contract was timed out on
|
||||
// chain.
|
||||
ResolverOutcomeTimeout ResolverOutcome = 3
|
||||
)
|
||||
|
||||
// ResolverReport provides an account of the outcome of a resolver. This differs
|
||||
|
||||
Reference in new issue
Block a user