Skip to content

Conversation

maflcko
Copy link
Member

@maflcko maflcko commented Apr 28, 2021

An async shutdown during init is confusing when a simple boolean return value can be used for a synchronous shutdown.

This also changes the error message on stderr from:

Error: A fatal internal error occurred, see debug.log for details
Error: A fatal internal error occurred, see debug.log for details

To:

Error: basic block filter index best block of the index goes beyond pruned data. Please disable the index or reindex (which will download the whole blockchain again)

@DrahtBot
Copy link
Contributor

DrahtBot commented Apr 28, 2021

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@laanwj
Copy link
Member

laanwj commented May 5, 2021

Code review ACK—however this introduces two warnings here locally:

…/bitcoin/src/test/coinstatsindex_tests.cpp:35:5: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]                                                       
    coin_stats_index.Start();                                                                                     
    ^~~~~~~~~~~~~~~~~~~~~~                          
1 warning generated.            
…/bitcoin/src/init.cpp:1566:9: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]                                                                          
        g_coin_stats_index->Start();                   
        ^~~~~~~~~~~~~~~~~~~~~~~~~                
1 warning generated.  

@maflcko
Copy link
Member Author

maflcko commented May 12, 2021

Rebased due to change in adjacent line

@laanwj
Copy link
Member

laanwj commented May 12, 2021

Code review ACK faad68f

@laanwj laanwj merged commit d2ec372 into bitcoin:master May 12, 2021
@maflcko maflcko deleted the 2104-indexInit branch May 12, 2021 13:06
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request May 12, 2021
faad68f index: Avoid async shutdown on init error (MarcoFalke)

Pull request description:

  An async shutdown during init is confusing when a simple boolean return value can be used for a synchronous shutdown.

  This also changes the error message on stderr from:

  ```
  Error: A fatal internal error occurred, see debug.log for details
  Error: A fatal internal error occurred, see debug.log for details
  ```

  To:

  ```
  Error: basic block filter index best block of the index goes beyond pruned data. Please disable the index or reindex (which will download the whole blockchain again)

ACKs for top commit:
  laanwj:
    Code review ACK faad68f

Tree-SHA512: 92dd895266d6d15a6b1a5c081c9b83f83d5c82e9bfceb3ea0664f48540812239e274c829ff0271c4a0afb6d6a8f67d89c5af20d719982ad62999a41ca0623274
domob1812 added a commit to domob1812/namecoin-core that referenced this pull request May 17, 2021
Check the return value when starting the name-hash index, and properly
handle a failure.  This is an addition to the upstream changes from
bitcoin/bitcoin#21796 for Namecoin.
gwillen pushed a commit to ElementsProject/elements that referenced this pull request Jun 1, 2022
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Aug 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants