@@ -19,44 +19,44 @@ const (
19
19
// confirmed. This state will mostly coalesce with StateHtlcConfirmed,
20
20
// except in the case where we wait for fees to come down before we
21
21
// sweep.
22
- StatePreimageRevealed = 1
22
+ StatePreimageRevealed SwapState = 1
23
23
24
24
// StateSuccess is the final swap state that is reached when the sweep
25
25
// tx has the required confirmation depth (SweepConfDepth) and the
26
26
// server pulled the off-chain htlc.
27
- StateSuccess = 2
27
+ StateSuccess SwapState = 2
28
28
29
29
// StateFailOffchainPayments indicates that it wasn't possible to find
30
30
// routes for one or both of the off-chain payments to the server that
31
31
// satisfied the payment restrictions (fee and timelock limits).
32
- StateFailOffchainPayments = 3
32
+ StateFailOffchainPayments SwapState = 3
33
33
34
34
// StateFailTimeout indicates that the on-chain htlc wasn't confirmed
35
35
// before its expiry or confirmed too late (MinPreimageRevealDelta
36
36
// violated).
37
- StateFailTimeout = 4
37
+ StateFailTimeout SwapState = 4
38
38
39
39
// StateFailSweepTimeout indicates that the on-chain htlc wasn't swept
40
40
// before the server revoked the htlc. The server didn't pull the
41
41
// off-chain htlc (even though it could have) and we timed out the
42
42
// off-chain htlc ourselves. No funds lost.
43
- StateFailSweepTimeout = 5
43
+ StateFailSweepTimeout SwapState = 5
44
44
45
45
// StateFailInsufficientValue indicates that the published on-chain htlc
46
46
// had a value lower than the requested amount.
47
- StateFailInsufficientValue = 6
47
+ StateFailInsufficientValue SwapState = 6
48
48
49
49
// StateFailTemporary indicates that the swap cannot progress because
50
50
// of an internal error. This is not a final state. Manual intervention
51
51
// (like a restart) is required to solve this problem.
52
- StateFailTemporary = 7
52
+ StateFailTemporary SwapState = 7
53
53
54
54
// StateHtlcPublished means that the client published the on-chain htlc.
55
- StateHtlcPublished = 8
55
+ StateHtlcPublished SwapState = 8
56
56
57
57
// StateInvoiceSettled means that the swap invoice has been paid by the
58
58
// server.
59
- StateInvoiceSettled = 9
59
+ StateInvoiceSettled SwapState = 9
60
60
)
61
61
62
62
// SwapStateType defines the types of swap states that exist. Every swap state
0 commit comments