Skip to content

Commit 3963bad

Browse files
committed
staticaddr: remove duplicate deposit finalize method
1 parent f7769d2 commit 3963bad

File tree

2 files changed

+1
-16
lines changed

2 files changed

+1
-16
lines changed

staticaddr/deposit/actions.go

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -137,21 +137,6 @@ func (f *FSM) WaitForExpirySweepAction(ctx context.Context,
137137
}
138138
}
139139

140-
// SweptExpiredDepositAction is the final action of the FSM. It signals to the
141-
// manager that the deposit has been swept and the FSM can be removed. It also
142-
// ends the state machine main loop by cancelling its context.
143-
func (f *FSM) SweptExpiredDepositAction(ctx context.Context,
144-
_ fsm.EventContext) fsm.EventType {
145-
146-
select {
147-
case <-ctx.Done():
148-
return fsm.OnError
149-
150-
case f.finalizedDepositChan <- f.deposit.OutPoint:
151-
return fsm.NoOp
152-
}
153-
}
154-
155140
// FinalizeDepositAction is the final action after a withdrawal. It signals to
156141
// the manager that the deposit has been swept and the FSM can be removed.
157142
func (f *FSM) FinalizeDepositAction(ctx context.Context,

staticaddr/deposit/fsm.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ func (f *FSM) DepositStatesV0() fsm.States {
292292
Transitions: fsm.Transitions{
293293
OnExpiry: Expired,
294294
},
295-
Action: f.SweptExpiredDepositAction,
295+
Action: f.FinalizeDepositAction,
296296
},
297297
Withdrawing: fsm.State{
298298
Transitions: fsm.Transitions{

0 commit comments

Comments
 (0)