Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix node shutdown during catchup if peers are not found #1431

Merged
merged 1 commit into from
Mar 3, 2025

Conversation

charithabandi
Copy link
Contributor

No description provided.

@charithabandi charithabandi linked an issue Mar 3, 2025 that may be closed by this pull request
@charithabandi charithabandi requested a review from jchappelow March 3, 2025 15:22
@@ -941,7 +941,7 @@ func (ce *ConsensusEngine) doCatchup(ctx context.Context) error {

startHeight := ce.lastCommitHeight()
if err := ce.processCurrentBlock(ctx); err != nil {
if errors.Is(err, types.ErrBlkNotFound) || errors.Is(err, types.ErrNotFound) {
if errors.Is(err, types.ErrBlkNotFound) || errors.Is(err, types.ErrNotFound) || errors.Is(err, types.ErrPeersNotFound) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. It may be tough to maintain an error whitelist.

I'm pondering if an ErrSyncFatal with opposite error handling semantics would be better. Can't tell.

@jchappelow jchappelow merged commit 73e7cc2 into kwilteam:main Mar 3, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

node shuts down if no peers when trying to catch up
2 participants