mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-30 18:51:15 +02:00
Switch hardened derivation marker to h in descriptors
This makes it easier to handle descriptor strings manually. E.g. an RPC call that takes an array of descriptors can now use '["desc": ".../0h/..."]'. Both markers can still be parsed. The default for new descriptors is changed to h. In normalized form h is also used. For private keys the chosen marker is preserved in a round trip. The hdkeypath field in getaddressinfo is also impacted by this change.
This commit is contained in:
@ -65,7 +65,7 @@ class ListDescriptorsTest(BitcoinTestFramework):
|
||||
self.log.info('Test descriptors with hardened derivations are listed in importable form.')
|
||||
xprv = 'tprv8ZgxMBicQKsPeuVhWwi6wuMQGfPKi9Li5GtX35jVNknACgqe3CY4g5xgkfDDJcmtF7o1QnxWDRYw4H5P26PXq7sbcUkEqeR4fg3Kxp2tigg'
|
||||
xpub_acc = 'tpubDCMVLhErorrAGfApiJSJzEKwqeaf2z3NrkVMxgYQjZLzMjXMBeRw2muGNYbvaekAE8rUFLftyEar4LdrG2wXyyTJQZ26zptmeTEjPTaATts'
|
||||
hardened_path = '/84\'/1\'/0\''
|
||||
hardened_path = '/84h/1h/0h'
|
||||
wallet = node.get_wallet_rpc('w2')
|
||||
wallet.importdescriptors([{
|
||||
'desc': descsum_create('wpkh(' + xprv + hardened_path + '/0/*)'),
|
||||
|
Reference in New Issue
Block a user