walletdb: Log additional exception error messages for corrupted wallets #32598

pull achow101 wants to merge 1 commits into bitcoin:master from achow101:loadwallet-log-runtime_error changing 1 files +7 −2
  1. achow101 commented at 0:42 am on May 23, 2025: member

    Many exceptions thrown for corruption are std::runtime_error; we should catch those and log the message to help with debugging.

    Split from #32489

  2. DrahtBot commented at 0:42 am on May 23, 2025: contributor

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

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/32598.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK furszy, rkrux
    Concept ACK jonatack

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

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #27865 (wallet: Track no-longer-spendable TXOs separately by achow101)
    • #27286 (wallet: Keep track of the wallet’s own transaction outputs in memory by achow101)

    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.

  3. furszy commented at 2:04 pm on May 23, 2025: member
    Should also change HasLegacyRecords() as it would log the same error twice with this change.
  4. rkrux commented at 2:32 pm on May 23, 2025: contributor

    ACK 62ad4d80883191073ea39f8b8d5ccef0748414a1

    Should also change HasLegacyRecords() as it would log the same error twice with this change.

    That^ log can be removed as I checked that the only other usage of HasLegacyRecords is directly inside the MigrateLegacyToDescriptor function that comes after the corresponding LoadWallet call. So, there should not be any informative log missing after its removal.

  5. walletdb: Log additional exception error messages for corrupted wallets ad9a13fc42
  6. achow101 commented at 6:31 pm on May 23, 2025: member

    Should also change HasLegacyRecords() as it would log the same error twice with this change.

    Done

  7. achow101 force-pushed on May 23, 2025
  8. jonatack commented at 7:02 pm on May 23, 2025: member
    Concept ACK, would be great to add test coverage for this change (if feasible).
  9. furszy commented at 9:16 pm on May 23, 2025: member
    ACK ad9a13fc424e9deb262e2b1d54bcdc7370263ea0
  10. DrahtBot requested review from jonatack on May 23, 2025
  11. DrahtBot requested review from rkrux on May 23, 2025
  12. rkrux approved
  13. rkrux commented at 6:03 am on May 24, 2025: contributor
    ACK ad9a13fc424e9deb262e2b1d54bcdc7370263ea0

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: 2025-05-25 18:12 UTC

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