@@ -111,18 +111,13 @@ var (
111111 // transaction was sufficiently confirmed.
112112 HtlcTimeoutSwept = fsm .StateType ("HtlcTimeoutSwept" )
113113
114- // FetchSignPushSweeplessSweepTx is the state where the client fetches,
115- // signs and pushes the sweepless sweep tx signatures to the server.
116- FetchSignPushSweeplessSweepTx = fsm .StateType ("FetchSignPushSweeplessSweepTx" ) //nolint:lll
117-
118114 // Succeeded is the state the swap is in if it was successful.
119115 Succeeded = fsm .StateType ("Succeeded" )
120116
121- // SucceededSweeplessSigFailed is the state the swap is in if the swap
122- // payment was received but the client failed to sign the sweepless
123- // sweep transaction. This is considered a successful case from the
124- // client's perspective.
125- SucceededSweeplessSigFailed = fsm .StateType ("SucceededSweeplessSigFailed" ) //nolint:lll
117+ // SucceededTransitioningFailed is the state the swap is in if the swap
118+ // payment was received but the client was not able to transition
119+ // the deposits to the looped-in state.
120+ SucceededTransitioningFailed = fsm .StateType ("SucceededTransitioningFailed" ) //nolint:lll
126121
127122 // UnlockDeposits is the state where the deposits are reset. This
128123 // happens when the state machine encountered an error and the swap
@@ -135,30 +130,29 @@ var (
135130
136131var PendingStates = []fsm.StateType {
137132 InitHtlcTx , SignHtlcTx , MonitorInvoiceAndHtlcTx , PaymentReceived ,
138- SweepHtlcTimeout , MonitorHtlcTimeoutSweep , FetchSignPushSweeplessSweepTx ,
133+ SweepHtlcTimeout , MonitorHtlcTimeoutSweep ,
139134 UnlockDeposits ,
140135}
141136
142137var FinalStates = []fsm.StateType {
143- HtlcTimeoutSwept , Succeeded , SucceededSweeplessSigFailed , Failed ,
138+ HtlcTimeoutSwept , Succeeded , SucceededTransitioningFailed , Failed ,
144139}
145140
146141var AllStates = append (PendingStates , FinalStates ... )
147142
148143// Events.
149144var (
150- OnInitHtlc = fsm .EventType ("OnInitHtlc" )
151- OnHtlcInitiated = fsm .EventType ("OnHtlcInitiated" )
152- OnHtlcTxSigned = fsm .EventType ("OnHtlcTxSigned" )
153- OnSweepHtlcTimeout = fsm .EventType ("OnSweepHtlcTimeout" )
154- OnHtlcTimeoutSweepPublished = fsm .EventType ("OnHtlcTimeoutSweepPublished" )
155- OnHtlcTimeoutSwept = fsm .EventType ("OnHtlcTimeoutSwept" )
156- OnPaymentReceived = fsm .EventType ("OnPaymentReceived" )
157- OnPaymentDeadlineExceeded = fsm .EventType ("OnPaymentDeadlineExceeded" )
158- OnSwapTimedOut = fsm .EventType ("OnSwapTimedOut" )
159- OnFetchSignPushSweeplessSweepTx = fsm .EventType ("OnFetchSignPushSweeplessSweepTx" )
160- OnSweeplessSweepSigned = fsm .EventType ("OnSweeplessSweepSigned" )
161- OnRecover = fsm .EventType ("OnRecover" )
145+ OnInitHtlc = fsm .EventType ("OnInitHtlc" )
146+ OnHtlcInitiated = fsm .EventType ("OnHtlcInitiated" )
147+ OnHtlcTxSigned = fsm .EventType ("OnHtlcTxSigned" )
148+ OnSweepHtlcTimeout = fsm .EventType ("OnSweepHtlcTimeout" )
149+ OnHtlcTimeoutSweepPublished = fsm .EventType ("OnHtlcTimeoutSweepPublished" )
150+ OnHtlcTimeoutSwept = fsm .EventType ("OnHtlcTimeoutSwept" )
151+ OnPaymentReceived = fsm .EventType ("OnPaymentReceived" )
152+ OnPaymentDeadlineExceeded = fsm .EventType ("OnPaymentDeadlineExceeded" )
153+ OnSwapTimedOut = fsm .EventType ("OnSwapTimedOut" )
154+ OnSucceeded = fsm .EventType ("OnSucceeded" )
155+ OnRecover = fsm .EventType ("OnRecover" )
162156)
163157
164158// LoopInStatesV0 returns the state and transition map for the loop-in state
@@ -215,27 +209,19 @@ func (f *FSM) LoopInStatesV0() fsm.States {
215209 },
216210 PaymentReceived : fsm.State {
217211 Transitions : fsm.Transitions {
218- OnFetchSignPushSweeplessSweepTx : FetchSignPushSweeplessSweepTx ,
219- OnRecover : SucceededSweeplessSigFailed ,
220- fsm .OnError : SucceededSweeplessSigFailed ,
212+ OnSucceeded : Succeeded ,
213+ OnRecover : Succeeded ,
214+ fsm .OnError : SucceededTransitioningFailed ,
221215 },
222216 Action : f .PaymentReceivedAction ,
223217 },
224- FetchSignPushSweeplessSweepTx : fsm.State {
225- Transitions : fsm.Transitions {
226- OnSweeplessSweepSigned : Succeeded ,
227- OnRecover : SucceededSweeplessSigFailed ,
228- fsm .OnError : SucceededSweeplessSigFailed ,
229- },
230- Action : f .FetchSignPushSweeplessSweepTxAction ,
231- },
232218 HtlcTimeoutSwept : fsm.State {
233219 Action : fsm .NoOpAction ,
234220 },
235221 Succeeded : fsm.State {
236222 Action : fsm .NoOpAction ,
237223 },
238- SucceededSweeplessSigFailed : fsm.State {
224+ SucceededTransitioningFailed : fsm.State {
239225 Action : fsm .NoOpAction ,
240226 },
241227 UnlockDeposits : fsm.State {
0 commit comments