Skip to content

Conversation

@KolbyML
Copy link
Contributor

@KolbyML KolbyML commented Jan 16, 2023

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

@DrahtBot
Copy link
Contributor

DrahtBot commented Jan 16, 2023

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 MarcoFalke

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

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.

@DrahtBot DrahtBot added the Tests label Jan 16, 2023
@KolbyML KolbyML force-pushed the test-redundant-assignment branch from 2bd0214 to 61360e0 Compare January 16, 2023 01:34
@maflcko maflcko changed the title test: Remove redundant function call test: Remove redundant key_to_p2pkh call Jan 16, 2023
@maflcko
Copy link
Member

maflcko commented Jan 16, 2023

ACK 61360e0

Comment on lines +126 to 128
info = w1.getaddressinfo(key.p2pkh_addr)
assert_equal(info["ismine"], True)
assert_equal(info["ischange"], True)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@maflcko maflcko merged commit 53ae102 into bitcoin:master Jan 16, 2023
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Jan 16, 2023
61360e0 test: Remove redundant function call (Kolby ML)

Pull request description:

  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

ACKs for top commit:
  MarcoFalke:
    ACK 61360e0

Tree-SHA512: d39117310d6630bad7a78c051e683dbfc77b27f6182014557fb900c1adaf5f1e12039c5a6c0ea50e908d4a8688da05f2deae701f12e06086d17dde86ae275ec5
@bitcoin bitcoin locked and limited conversation to collaborators Jan 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants