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.

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

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

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK mercie-ux

    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.

    <!--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.

  7. mercie-ux commented at 2:13 PM on May 5, 2026: none

    ACK d05f32e

    Confirmed minfee/maxfee coverage is meaningful — the fixture has a 31× spread (1000 sats vs 31200 sats).


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-20 06:52 UTC