test: use MiniWallet for getblockstats test data generation #35177

pull AgusR7 wants to merge 1 commits into bitcoin:master from AgusR7:test/getblockstats-gen-miniwallet changing 2 files +183 −175
  1. AgusR7 commented at 2:55 AM on April 29, 2026: none

    Fixes #31838. Follow-up to #33184.

    This updates rpc_getblockstats.py --gen-test-data to generate its fixture data using MiniWallet instead of wallet RPCs.

    The normal test path still loads predefined block/stat data from rpc_getblockstats.json, so the test continues to compare getblockstats results against fixed expected data rather than against freshly computed RPC output.

    This keeps the generator independent of wallet behavior while preserving the existing regression-test structure.

    Tested on a wallet-disabled Linux build:

    • python3 /tmp/bitcoin-build/test/functional/rpc_getblockstats.py
    • python3 /tmp/bitcoin-build/test/functional/rpc_getblockstats.py --gen-test-data --test-data /tmp/rpc_getblockstats.generated.json
    • python3 /tmp/bitcoin-build/test/functional/rpc_getblockstats.py --test-data /tmp/rpc_getblockstats.generated.json
  2. test: use MiniWallet for getblockstats test data generation d05f32e035
  3. DrahtBot added the label Tests on Apr 29, 2026
  4. DrahtBot commented at 2:55 AM on April 29, 2026: 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. A summary of reviews will appear here.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  5. maflcko commented at 7:18 AM on April 29, 2026: member

    In the pull description: You can start the test from the build dir, to pick up the ini automatically. That is python3 test/functional/rpc_getblockstats.py --configfile=/tmp/bitcoin-build/test/config.ini becomes python3 /tmp/bitcoin-build/test/functional/rpc_getblockstats.py etc.

  6. AgusR7 commented at 7:23 AM on April 29, 2026: none

    In the pull description: You can start the test from the build dir, to pick up the ini automatically. That is python3 test/functional/rpc_getblockstats.py --configfile=/tmp/bitcoin-build/test/config.ini becomes python3 /tmp/bitcoin-build/test/functional/rpc_getblockstats.py etc.

    Updated the test commands in the PR description, thanks.


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-05-01 06:12 UTC

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