test: Add comprehensive tests for GetNewChangeDestination #34323

pull b-l-u-e wants to merge 1 commits into bitcoin:master from b-l-u-e:test-wallet-getnewchangedestination changing 1 files +111 −0
  1. b-l-u-e commented at 9:34 pm on January 16, 2026: none

    Add comprehensive tests for GetNewChangeDestination

    Motivation

    This PR adds test coverage for CWallet::GetNewChangeDestination(), which currently lacks dedicated unit tests despite being called during every transaction creation.

    Test improvements:

    • Adds comprehensive coverage for a previously untested function
    • Tests all 4 Bitcoin address output types (BECH32, LEGACY, P2SH_SEGWIT, BECH32M)
    • Verifies privacy-critical behavior for (address uniqueness, keypool separation)
  2. DrahtBot added the label Tests on Jan 16, 2026
  3. DrahtBot commented at 9:34 pm on January 16, 2026: 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/34323.

    Reviews

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

  4. test: Add comprehensive tests for GetNewChangeDestination c6e673d465
  5. b-l-u-e force-pushed on Jan 16, 2026
  6. furszy commented at 10:10 pm on January 16, 2026: member
    The function is already covered through getrawchangeaddress RPC in the functional test framework. Also, functional tests are preferred when possible due to their compatibility and maintainability across releases.
  7. b-l-u-e commented at 11:00 pm on January 16, 2026: none
    thank you for your feedback..i will close this PR
  8. b-l-u-e closed this on Jan 16, 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-01-27 06:13 UTC

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