mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 10:38:42 +01:00
Merge bitcoin/bitcoin#26894: test: Remove redundant key_to_p2pkh call
61360e0cf9
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: ACK61360e0cf9
Tree-SHA512: d39117310d6630bad7a78c051e683dbfc77b27f6182014557fb900c1adaf5f1e12039c5a6c0ea50e908d4a8688da05f2deae701f12e06086d17dde86ae275ec5
This commit is contained in:
commit
53ae1022ea
@ -15,7 +15,6 @@ variants.
|
||||
- `test_address()` is called to call getaddressinfo for an address on node1
|
||||
and test the values returned."""
|
||||
|
||||
from test_framework.address import key_to_p2pkh
|
||||
from test_framework.blocktools import COINBASE_MATURITY
|
||||
from test_framework.test_framework import BitcoinTestFramework
|
||||
from test_framework.descriptors import descsum_create
|
||||
@ -120,12 +119,11 @@ class ImportDescriptorsTest(BitcoinTestFramework):
|
||||
|
||||
self.log.info("Internal addresses should be detected as such")
|
||||
key = get_generate_key()
|
||||
addr = key_to_p2pkh(key.pubkey)
|
||||
self.test_importdesc({"desc": descsum_create("pkh(" + key.pubkey + ")"),
|
||||
"timestamp": "now",
|
||||
"internal": True},
|
||||
success=True)
|
||||
info = w1.getaddressinfo(addr)
|
||||
info = w1.getaddressinfo(key.p2pkh_addr)
|
||||
assert_equal(info["ismine"], True)
|
||||
assert_equal(info["ischange"], True)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user