Skip to content

Commit 7aa2b74

Browse files
committed
Review feedback
1 parent 5db4d19 commit 7aa2b74

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

node/failover.go

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ func (s *sequencerRecoveryElector) Run(pCtx context.Context) error {
347347
cancel()
348348

349349
if err := <-syncErrCh; err != nil && !errors.Is(err, context.Canceled) {
350-
return fmt.Errorf("sync mode stopped with error during recovery switchover: %w", err)
350+
return fmt.Errorf("sync mode failed before switchover completed: %w", err)
351351
}
352352

353353
return s.startAggregatorPhase(pCtx)
@@ -404,7 +404,10 @@ func (s *sequencerRecoveryElector) waitForCatchup(ctx context.Context, syncState
404404

405405
var timeoutCh <-chan time.Time
406406
if s.p2pTimeout > 0 {
407+
s.logger.Debug().Dur("p2p_timeout", s.p2pTimeout).Msg("P2P catchup timeout configured")
407408
timeoutCh = time.After(s.p2pTimeout)
409+
} else {
410+
s.logger.Debug().Msg("P2P catchup timeout disabled, relying on DA only")
408411
}
409412
ignoreP2P := false
410413

@@ -436,14 +439,6 @@ func (s *sequencerRecoveryElector) waitForCatchup(ctx context.Context, syncState
436439

437440
p2pCaughtUp := ignoreP2P || (maxP2PHeight == 0 || storeHeight >= maxP2PHeight)
438441

439-
s.logger.Debug().
440-
Bool("da_caught_up", daCaughtUp).
441-
Bool("p2p_caught_up", p2pCaughtUp).
442-
Bool("ignore_p2p", ignoreP2P).
443-
Uint64("store_height", storeHeight).
444-
Uint64("max_p2p_height", maxP2PHeight).
445-
Msg("recovery catchup status")
446-
447442
if daCaughtUp && p2pCaughtUp && storeHeight > 0 {
448443
s.logger.Info().
449444
Uint64("store_height", storeHeight).

0 commit comments

Comments
 (0)