Skip to content

Commit 8d7da32

Browse files
committed
fix withdrawals
1 parent 1104e92 commit 8d7da32

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

staticaddr/deposit/fsm.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ func (f *FSM) DepositStatesV0() fsm.States {
304304
// state. The deposit by then has a withdrawal
305305
// address stamped to it which will cause it to
306306
// transition into the Withdrawing state again.
307-
OnRecover: Deposited,
307+
OnRecover: Withdrawing,
308308

309309
// A precondition for the Withdrawing state is
310310
// that the withdrawal transaction has been

staticaddr/withdraw/manager.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,8 @@ func (m *Manager) recoverWithdrawals(ctx context.Context) error {
219219
// cluster those with equal withdrawal addresses and kick-off
220220
// their withdrawal. Each cluster represents a separate withdrawal
221221
// intent by the user.
222-
activeDeposits, err := m.cfg.DepositManager.GetActiveDepositsInState(
223-
deposit.Deposited,
222+
withdrawingDeposits, err := m.cfg.DepositManager.GetActiveDepositsInState(
223+
deposit.Withdrawing,
224224
)
225225
if err != nil {
226226
return err
@@ -229,7 +229,7 @@ func (m *Manager) recoverWithdrawals(ctx context.Context) error {
229229
// Group the deposits by their finalized withdrawal transaction.
230230
depositsByWithdrawalTx := make(map[chainhash.Hash][]*deposit.Deposit)
231231
hash2tx := make(map[chainhash.Hash]*wire.MsgTx)
232-
for _, d := range activeDeposits {
232+
for _, d := range withdrawingDeposits {
233233
withdrawalTx := d.FinalizedWithdrawalTx
234234
if withdrawalTx == nil {
235235
continue

0 commit comments

Comments
 (0)