Skip to content

Commit 83b33da

Browse files
committed
staticaddr: remove duplicate deposit finalize method
1 parent 8fb5e6e commit 83b33da

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
@@ -141,21 +141,6 @@ func (f *FSM) WaitForExpirySweepAction(ctx context.Context,
141141
}
142142
}
143143

144-
// SweptExpiredDepositAction is the final action of the FSM. It signals to the
145-
// manager that the deposit has been swept and the FSM can be removed. It also
146-
// ends the state machine main loop by cancelling its context.
147-
func (f *FSM) SweptExpiredDepositAction(ctx context.Context,
148-
_ fsm.EventContext) fsm.EventType {
149-
150-
select {
151-
case <-ctx.Done():
152-
return fsm.OnError
153-
154-
case f.finalizedDepositChan <- f.deposit.OutPoint:
155-
return fsm.NoOp
156-
}
157-
}
158-
159144
// FinalizeDepositAction is the final action after a withdrawal. It signals to
160145
// the manager that the deposit has been swept and the FSM can be removed.
161146
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
@@ -297,7 +297,7 @@ func (f *FSM) DepositStatesV0() fsm.States {
297297
Transitions: fsm.Transitions{
298298
OnExpiry: Expired,
299299
},
300-
Action: f.SweptExpiredDepositAction,
300+
Action: f.FinalizeDepositAction,
301301
},
302302
Withdrawing: fsm.State{
303303
Transitions: fsm.Transitions{

0 commit comments

Comments
 (0)