Skip to content

Commit 53ae102

Browse files
author
MarcoFalke
committed
Merge bitcoin/bitcoin#26894: test: Remove redundant key_to_p2pkh call
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
2 parents 3dd2762 + 61360e0 commit 53ae102

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

test/functional/wallet_importdescriptors.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
- `test_address()` is called to call getaddressinfo for an address on node1
1616
and test the values returned."""
1717

18-
from test_framework.address import key_to_p2pkh
1918
from test_framework.blocktools import COINBASE_MATURITY
2019
from test_framework.test_framework import BitcoinTestFramework
2120
from test_framework.descriptors import descsum_create
@@ -120,12 +119,11 @@ def run_test(self):
120119

121120
self.log.info("Internal addresses should be detected as such")
122121
key = get_generate_key()
123-
addr = key_to_p2pkh(key.pubkey)
124122
self.test_importdesc({"desc": descsum_create("pkh(" + key.pubkey + ")"),
125123
"timestamp": "now",
126124
"internal": True},
127125
success=True)
128-
info = w1.getaddressinfo(addr)
126+
info = w1.getaddressinfo(key.p2pkh_addr)
129127
assert_equal(info["ismine"], True)
130128
assert_equal(info["ischange"], True)
131129

0 commit comments

Comments
 (0)