Skip to content

Commit

Permalink
Fix edge case for blocksync (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
yzang2019 authored Dec 28, 2023
1 parent 460dc1f commit 778330b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/blocksync/reactor.go
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ func (r *Reactor) poolRoutine(ctx context.Context, stateSynced bool, blockSyncCh
)
continue

case r.pool.IsCaughtUp() && r.previousMaxPeerHeight < r.pool.MaxPeerHeight():
case r.pool.IsCaughtUp() && r.previousMaxPeerHeight <= r.pool.MaxPeerHeight():
r.logger.Info("switching to consensus reactor", "height", height)

case time.Since(lastAdvance) > syncTimeout:
Expand Down

0 comments on commit 778330b

Please sign in to comment.