Skip to content

btcd: fix nonzero exit code on sigint when indexing cfindex#2557

Open
allocz wants to merge 1 commit into
btcsuite:masterfrom
allocz:fix_nonzero_exit_code_on_sigint_when_indexing_cfindex
Open

btcd: fix nonzero exit code on sigint when indexing cfindex#2557
allocz wants to merge 1 commit into
btcsuite:masterfrom
allocz:fix_nonzero_exit_code_on_sigint_when_indexing_cfindex

Conversation

@allocz

@allocz allocz commented Jun 22, 2026

Copy link
Copy Markdown

Change Description

Fixes #2530 by returning nil instead of error when newServer returns error because an interrupt was received.

Steps to Test

  1. Sync btcd up to some height, then stop the node;
  2. Start btcd with --dropcfindex, btcd will stop after dropping the index;
  3. Start btcd again and send ctrl+c after seeing a log containing [INF] INDX: Catching up indexes from height;
  4. The status code should be zero with the patch, and not zero without the patch.

Pull Request Checklist

Testing

  • Your PR passes all CI checks.
  • Tests covering the positive and negative (error paths) are included.
  • Bug fixes contain tests triggering the bug to prevent regressions.

Code Style and Documentation

📝 Please see our Contribution Guidelines for further guidance.

@allocz allocz force-pushed the fix_nonzero_exit_code_on_sigint_when_indexing_cfindex branch from 738cf8b to 9fe11c8 Compare June 22, 2026 18:51
@allocz allocz changed the title Fix nonzero exit code on sigint when indexing cfindex btcd: fix nonzero exit code on sigint when indexing cfindex Jun 22, 2026
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.

[bug]: utreexod exits with status=1/FAILURE when indexing cfilters

1 participant