refactor: `wallet_importdescriptors` to separate `run_test()` contents into specific functions #36402

pull nebula-21 wants to merge 1 commits into bitcoin:master from nebula-21:refactor-wallet-importdescriptors-test changing 1 files +543 −494
  1. nebula-21 commented at 5:12 PM on October 1, 2026: contributor

    The motivation behind this PR came when reviewing a PR related with wallet_importdescriptors and I noticed that the run_test() function was more than 800 lines of code long, and looked messy and confusing, specially for someone not familiar with that test suite. I believe refactoring the contents inside run_test() and separating it into specific functions would make the test easier to understand and to add new future test cases.

    To review this PR, I recommend using the following command to easily see that the changes are only code movement and function organization:

    git show --color-moved=dimmed-zebra
    

    Suggestions about the new functions, organization, or their order are more than welcome. The approach I took is the one I felt would provide a good balance between keeping the code clean and making the changes as easy as possible to review.

    If reviewers would prefer to split this into multiple commits, I'm also happy to do so.

  2. DrahtBot added the label Refactoring on Oct 1, 2026
  3. DrahtBot commented at 5:12 PM on October 1, 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.

    Type Reviewers
    Concept ACK polespinasa

    If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #36257 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36257.svg"></sub> (qa: assert_equals -> assert_true/assert_false by hodlinator)
    • #31668 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/31668.svg"></sub> (Added rescan option for import descriptors by saikiran57)

    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.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

    LLM Linter (✨ experimental)

    Possible places where named args for integral literals may be used (e.g. func(x, /*named_arg=*/0) in C++, and func(x, named_arg=0) in Python):

    • test/functional/wallet_importdescriptors.py: multi_priv_big.sendtoaddress(w0.getnewaddress(), 10, "", "", True)

    <sup>2026-10-09 12:19:54</sup>

  4. w0xlt commented at 6:26 PM on October 1, 2026: contributor

    Approach aCK

  5. polespinasa commented at 8:53 PM on October 5, 2026: member

    Concept ACK

    There are some unnecessary new lines added and removed that add noise to the color-dimmed filter :)

  6. nebula-21 force-pushed on Oct 8, 2026
  7. nebula-21 commented at 3:19 PM on October 8, 2026: contributor

    Concept ACK

    There are some unnecessary new lines added and removed that add noise to the color-dimmed filter :)

    I've tried to avoid them as much as possible, but some of them are necessary to re-arrange into new functions keeping the separations of the original tests intact.

  8. DrahtBot added the label Needs rebase on Oct 9, 2026
  9. nebula-21 force-pushed on Oct 9, 2026
  10. refactor: `wallet_importdescriptors` to separate `run_test()` contents into specific functions e46592815f
  11. nebula-21 commented at 12:25 PM on October 9, 2026: contributor

    Rebased on master

  12. DrahtBot removed the label Needs rebase on Oct 9, 2026

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-10-21 21:51 UTC

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