test: Remove redundant key_to_p2pkh call #26894

pull KolbyML wants to merge 1 commits into bitcoin:master from KolbyML:test-redundant-assignment changing 1 files +1 −3
  1. KolbyML commented at 12:58 AM on January 16, 2023: contributor

    Removed unnecessary function call and assignment get_generate_key() already calls key_to_p2pkh() and stores it in the object as p2pkh_addr.

    key.p2pkh_addr is already used for most testcases as well, so it is just a redundant call

  2. DrahtBot commented at 12:58 AM on January 16, 2023: 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.

    Type Reviewers
    ACK MarcoFalke

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

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #22838 (descriptors: Be able to specify change and receiving in a single descriptor string by achow101)

    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.

  3. DrahtBot added the label Tests on Jan 16, 2023
  4. test: Remove redundant function call 61360e0cf9
  5. KolbyML force-pushed on Jan 16, 2023
  6. in test/functional/wallet_importdescriptors.py:128 in 61360e0cf9
     125 |                                "internal": True},
     126 |                               success=True)
     127 | -        info = w1.getaddressinfo(addr)
     128 | +        info = w1.getaddressinfo(key.p2pkh_addr)
     129 |          assert_equal(info["ismine"], True)
     130 |          assert_equal(info["ischange"], True)
    


    kouloumos commented at 9:20 AM on January 16, 2023:

    as you are touching this; for some reason, this is the only one of the related subtests that the test_address() helper method is not used.

  7. maflcko renamed this:
    test: Remove redundant function call
    test: Remove redundant key_to_p2pkh call
    on Jan 16, 2023
  8. maflcko commented at 9:23 AM on January 16, 2023: member

    ACK 61360e0cf9a9be44cb744b0f9dbc661b41a7cce6

  9. maflcko merged this on Jan 16, 2023
  10. maflcko closed this on Jan 16, 2023

  11. sidhujag referenced this in commit 5a78ffaee2 on Jan 16, 2023
  12. bitcoin locked this on Jan 16, 2024

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-04-21 18:13 UTC

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