init: Return ChainstateLoadStatus::INTERRUPTED when verification was interrupted. #27157

pull mzumsande wants to merge 2 commits into bitcoin:master from mzumsande:202302_verifydb_followup changing 2 files +6 −1
  1. mzumsande commented at 8:15 PM on February 24, 2023: contributor

    This addresses two outstanding comments by ryanofsky from #25574:

    • return ChainstateLoadStatus::INTERRUPTED instead of ChainstateLoadStatus::SUCCESS if verification was stopped by an interrupt. This would coincide with straightforward expectation, and it avoids a misleading log entry in init for the block index load time (because that would include the verificiation, which didn't complete). It shouldn't affect node behavior otherwise because the shutdown signal would be caught in init anyway. In test, this would lead to an assert (link), which also makes more sense because benign interrupts are not expected there during init. This can be tested by setting a large value for -checkblocks, interrupting the node during block verification and observing the log. #25574 (review)
    • add documentation for require_full_verification #25574 (review)
  2. init: Return more fitting ChainStateLoadStatus if verification was interrupted
    This also avoids a misleading block index loadtime log entry in init.
    
    Co-authored-by: Ryan Ofsky <ryan@ofsky.org>
    7dff7da4f5
  3. doc: add explanation for fail_on_insufficient_dbcache c5825e14f8
  4. DrahtBot commented at 8:15 PM on February 24, 2023: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK MarcoFalke

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

  5. DrahtBot renamed this:
    25574 followups (VerifyDB error handling)
    25574 followups (VerifyDB error handling)
    on Feb 24, 2023
  6. maflcko commented at 10:22 AM on February 26, 2023: member

    It might be good to explain and motivate the behaviour change. Calling it "25574 followups" is less useful than, for example, mentioning if the exit code is changed, if a warning will be printed, or if this turns an operation into an error?

  7. fanquake requested review from ryanofsky on Feb 27, 2023
  8. mzumsande renamed this:
    25574 followups (VerifyDB error handling)
    init: Return ChainstateLoadStatus::INTERRUPTED when verification was interrupted.
    on Feb 27, 2023
  9. mzumsande commented at 3:45 PM on February 27, 2023: contributor

    It might be good to explain and motivate the behaviour change. Calling it "25574 followups" is less useful than, for example, mentioning if the exit code is changed, if a warning will be printed, or if this turns an operation into an error?

    I changed the title and expanded the explanation.

  10. maflcko commented at 3:49 PM on February 27, 2023: member

    thanks lgtm ACK c5825e14f8999a8c5f5121027af9e07ac51ab42e

  11. fanquake merged this on Feb 28, 2023
  12. fanquake closed this on Feb 28, 2023

  13. sidhujag referenced this in commit b2ff0a045e on Feb 28, 2023
  14. mzumsande deleted the branch on Feb 28, 2023
  15. Fabcien referenced this in commit 30388014c4 on Dec 7, 2023
  16. bitcoin locked this on Feb 28, 2024

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-17 03:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me