Use WitnessV0KeyHash in TestAddAddressesToSendBook #875

pull maflcko wants to merge 1 commits into bitcoin-core:master from maflcko:2505-qt-addr-test changing 1 files +2 −3
  1. maflcko commented at 12:35 pm on May 19, 2025: contributor

    Fixes https://github.com/bitcoin/bitcoin/issues/32558 Fixes #874

    This fixes a bug introduced in commit fafee85358397289aa4c6b799d2603a5d89e83a2, which changed the type of the dummy address from WitnessV0KeyHash to PKHash. It was expected that this is fine, given that this is just a dummy address. However, the base58 characters can include the substring “io”, leading to test failures later on.

    Fix it by just using WitnessV0KeyHash again.

    For reference, a passing test could look like:

    0Model contains 2 rows and 2 columns.
    1--- Model Data ---
    2Row 0 : "io - new A\tmxgkqJWAwfUwbgzZUsWrG1stKWV6fDn8YH"
    3Row 1 : "io - new B\tmhsxP2yrYDQiEncT8HzKxQSFSFJmUsudsP"
    4------------------
    

    A failing test could look like:

    0Model contains 3 rows and 2 columns.
    1--- Model Data ---
    2Row 0 : "already here (s)\tmyDFZSKDQdPMMoSQgzkDtq2yioo8DA8qCX" 
    3Row 1 : "io - new A\tmsAqQKjMrbxYRDhGXBBJ3yUEQxj5Bf5Njz"
    4Row 2 : "io - new B\tmtALQiit8dw33kznVfHDgE38ohfgz2Pchc"
    5------------------
    6FAIL!  : AddressBookTests::addressBookTests() Compared values are not the same
    7   Actual   (table_view->model()->rowCount()): 3
    8   Expected (2)                              : 2
    9   Loc: [qt/test/addressbooktests.cpp(219)]
    
  2. Use WitnessV0KeyHash in TestAddAddressesToSendBook fa982f1425
  3. DrahtBot commented at 12:36 pm on May 19, 2025: contributor

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

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK achow101, hebasto

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

  4. maflcko commented at 3:15 pm on May 19, 2025: contributor
    can someone pls assign 30.0 milestone?
  5. achow101 added this to the milestone 30.0 on May 19, 2025
  6. hebasto commented at 5:12 pm on May 19, 2025: member
    cc @furszy
  7. achow101 commented at 5:37 pm on May 19, 2025: member

    ACK fa982f14254433a969499e93c1c3f0db31dce6ab

    Neither i nor o are part of the bech32 character set, so that should resolve this issue. It might be better to make the label something more unique though.

  8. hebasto approved
  9. hebasto commented at 7:01 pm on May 19, 2025: member
    ACK fa982f14254433a969499e93c1c3f0db31dce6ab, I have reviewed the code along with the related changes from https://github.com/bitcoin/bitcoin/pull/32511.
  10. hebasto merged this on May 19, 2025
  11. hebasto closed this on May 19, 2025

  12. maflcko deleted the branch on May 20, 2025

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/gui. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-06-13 14:20 UTC

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