diff --git a/staticaddr/deposit/manager.go b/staticaddr/deposit/manager.go index cdea4949a..7ccf1376b 100644 --- a/staticaddr/deposit/manager.go +++ b/staticaddr/deposit/manager.go @@ -106,12 +106,16 @@ func NewManager(cfg *ManagerConfig) *Manager { func (m *Manager) Run(ctx context.Context, initChan chan struct{}) error { newBlockChan, newBlockErrChan, err := m.cfg.ChainNotifier.RegisterBlockEpochNtfn(ctx) //nolint:lll if err != nil { + log.Errorf("unable to register block epoch notifier: %v", err) + return err } // Recover previous deposits and static address parameters from the DB. err = m.recoverDeposits(ctx) if err != nil { + log.Errorf("unable to recover deposits: %v", err) + return err } diff --git a/staticaddr/loopin/manager.go b/staticaddr/loopin/manager.go index 79423fdc3..553efd507 100644 --- a/staticaddr/loopin/manager.go +++ b/staticaddr/loopin/manager.go @@ -152,6 +152,9 @@ func (m *Manager) Run(ctx context.Context, initChan chan struct{}) error { registerBlockNtfn := m.cfg.ChainNotifier.RegisterBlockEpochNtfn newBlockChan, newBlockErrChan, err := registerBlockNtfn(ctx) if err != nil { + log.Errorf("unable to register for block notifications: %v", + err) + return err } @@ -159,14 +162,14 @@ func (m *Manager) Run(ctx context.Context, initChan chan struct{}) error { // that are not yet completed. err = m.recoverLoopIns(ctx) if err != nil { + log.Errorf("unable to recover loop-ins: %v", err) + return err } // Register for notifications of loop-in sweep requests. sweepReqs := m.cfg.NotificationManager. - SubscribeStaticLoopInSweepRequests( - ctx, - ) + SubscribeStaticLoopInSweepRequests(ctx) // Communicate to the caller that the address manager has completed its // initialization. diff --git a/staticaddr/withdraw/manager.go b/staticaddr/withdraw/manager.go index 7fc26d329..23de26c95 100644 --- a/staticaddr/withdraw/manager.go +++ b/staticaddr/withdraw/manager.go @@ -152,11 +152,16 @@ func (m *Manager) Run(ctx context.Context, initChan chan struct{}) error { m.cfg.ChainNotifier.RegisterBlockEpochNtfn(ctx) if err != nil { + log.Errorf("unable to register for block epoch "+ + "notifications: %v", err) + return err } err = m.recoverWithdrawals(ctx) if err != nil { + log.Errorf("unable to recover withdrawals: %v", err) + return err }