wallet: fail importdescriptors when shutdown interrupts rescan #36991

pull Turtlecute33 wants to merge 1 commits into bitcoin:master from Turtlecute33:wallet-import-rescan-shutdown changing 4 files +24 −9
  1. Turtlecute33 commented at 9:56 PM on November 26, 2026: contributor

    Problem: If the node is stopped while importdescriptors is rescanning, the call still returns success for descriptors whose history was not scanned. The wallet's best block is already at the tip, so nothing rescans on the next start, and the transactions stay missing until a manual rescanblockchain.

    Fix: Treat a rescan that shutdown cut short like one stopped with abortrescan: the import fails with the existing "Rescan aborted by user." error. In both cases the descriptors stay in the wallet.

  2. wallet: fail importdescriptors when shutdown interrupts rescan
    A rescan that shutdown cut short counted as complete. importdescriptors
    returned success for descriptors whose history was not scanned, and
    the wallet did not rescan on the next start.
    
    Report the interrupted scan from ScanFromTime and fail the import with
    the "Rescan aborted by user." error, as for abortrescan.
    ce4a8e8d00
  3. DrahtBot added the label Wallet on Nov 26, 2026
  4. DrahtBot commented at 9:57 PM on November 26, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    External sites

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy for information on the review process. A summary of reviews will appear here.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

Labels

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-11-28 05:51 UTC

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