mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-07-16 17:50:56 +02:00
test: use ExtendedPrivateKey in wallet_descriptor.py
This commit is contained in:
@@ -12,6 +12,8 @@ except ImportError:
|
||||
import re
|
||||
|
||||
from test_framework.blocktools import COINBASE_MATURITY
|
||||
from test_framework.descriptors import descsum_create
|
||||
from test_framework.extendedkey import ExtendedPrivateKey
|
||||
from test_framework.messages import ser_string
|
||||
from test_framework.test_framework import BitcoinTestFramework
|
||||
from test_framework.util import (
|
||||
@@ -173,7 +175,7 @@ class WalletDescriptorTest(BitcoinTestFramework):
|
||||
self.log.info("Test that unlock is needed when deriving only hardened keys in an encrypted wallet")
|
||||
with WalletUnlock(send_wrpc, "pass"):
|
||||
send_wrpc.importdescriptors([{
|
||||
"desc": "wpkh(tprv8ZgxMBicQKsPd7Uf69XL1XwhmjHopUGep8GuEiJDZmbQz6o58LninorQAfcKZWARbtRtfnLcJ5MQ2AtHcQJCCRUcMRvmDUjyEmNUWwx8UbK/0h/*h)#y4dfsj7n",
|
||||
"desc": descsum_create(f"wpkh({ExtendedPrivateKey.generate().to_string()}/0h/*h)"),
|
||||
"timestamp": "now",
|
||||
"range": [0,10],
|
||||
"active": True
|
||||
|
||||
Reference in New Issue
Block a user