From 8401ca58bec16aa3182679937e11652707ed7c5c Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Tue, 25 Mar 2025 13:38:24 +0100 Subject: [PATCH] staticaddr: non-concurrent deposit recovery --- staticaddr/deposit/manager.go | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/staticaddr/deposit/manager.go b/staticaddr/deposit/manager.go index ea0b2e094..717e447a1 100644 --- a/staticaddr/deposit/manager.go +++ b/staticaddr/deposit/manager.go @@ -196,13 +196,10 @@ func (m *Manager) recoverDeposits(ctx context.Context) error { } // Send the OnRecover event to the state machine. - go func() { - err = fsm.SendEvent(ctx, OnRecover, nil) - if err != nil { - log.Errorf("Error sending OnStart event: %v", - err) - } - }() + err = fsm.SendEvent(ctx, OnRecover, nil) + if err != nil { + log.Errorf("Error sending OnStart event: %v", err) + } m.mu.Lock() m.activeDeposits[d.OutPoint] = fsm