@@ -19,44 +19,44 @@ const (
1919 // confirmed. This state will mostly coalesce with StateHtlcConfirmed,
2020 // except in the case where we wait for fees to come down before we
2121 // sweep.
22- StatePreimageRevealed = 1
22+ StatePreimageRevealed SwapState = 1
2323
2424 // StateSuccess is the final swap state that is reached when the sweep
2525 // tx has the required confirmation depth (SweepConfDepth) and the
2626 // server pulled the off-chain htlc.
27- StateSuccess = 2
27+ StateSuccess SwapState = 2
2828
2929 // StateFailOffchainPayments indicates that it wasn't possible to find
3030 // routes for one or both of the off-chain payments to the server that
3131 // satisfied the payment restrictions (fee and timelock limits).
32- StateFailOffchainPayments = 3
32+ StateFailOffchainPayments SwapState = 3
3333
3434 // StateFailTimeout indicates that the on-chain htlc wasn't confirmed
3535 // before its expiry or confirmed too late (MinPreimageRevealDelta
3636 // violated).
37- StateFailTimeout = 4
37+ StateFailTimeout SwapState = 4
3838
3939 // StateFailSweepTimeout indicates that the on-chain htlc wasn't swept
4040 // before the server revoked the htlc. The server didn't pull the
4141 // off-chain htlc (even though it could have) and we timed out the
4242 // off-chain htlc ourselves. No funds lost.
43- StateFailSweepTimeout = 5
43+ StateFailSweepTimeout SwapState = 5
4444
4545 // StateFailInsufficientValue indicates that the published on-chain htlc
4646 // had a value lower than the requested amount.
47- StateFailInsufficientValue = 6
47+ StateFailInsufficientValue SwapState = 6
4848
4949 // StateFailTemporary indicates that the swap cannot progress because
5050 // of an internal error. This is not a final state. Manual intervention
5151 // (like a restart) is required to solve this problem.
52- StateFailTemporary = 7
52+ StateFailTemporary SwapState = 7
5353
5454 // StateHtlcPublished means that the client published the on-chain htlc.
55- StateHtlcPublished = 8
55+ StateHtlcPublished SwapState = 8
5656
5757 // StateInvoiceSettled means that the swap invoice has been paid by the
5858 // server.
59- StateInvoiceSettled = 9
59+ StateInvoiceSettled SwapState = 9
6060)
6161
6262// SwapStateType defines the types of swap states that exist. Every swap state
0 commit comments