Skip to content

Commit e704119

Browse files
stariushieblmi
authored andcommitted
deposit: fix sending to finalizedDepositChan
1 parent 484681a commit e704119

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

staticaddr/deposit/actions.go

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,9 @@ func (f *FSM) SweptExpiredDepositAction(ctx context.Context,
147147
case <-ctx.Done():
148148
return fsm.OnError
149149

150-
default:
151-
f.finalizedDepositChan <- f.deposit.OutPoint
152-
ctx.Done()
150+
case f.finalizedDepositChan <- f.deposit.OutPoint:
151+
return fsm.NoOp
153152
}
154-
155-
return fsm.NoOp
156153
}
157154

158155
// FinalizeDepositAction is the final action after a withdrawal. It signals to
@@ -164,9 +161,7 @@ func (f *FSM) FinalizeDepositAction(ctx context.Context,
164161
case <-ctx.Done():
165162
return fsm.OnError
166163

167-
default:
168-
f.finalizedDepositChan <- f.deposit.OutPoint
164+
case f.finalizedDepositChan <- f.deposit.OutPoint:
165+
return fsm.NoOp
169166
}
170-
171-
return fsm.NoOp
172167
}

0 commit comments

Comments
 (0)