Adds the HD keypath (example: `m/0'/0'/1') to the persisted CKeyMetadata object.
Currently, the used keypath scheme is still static and should be made dynamic/configurable in a different PR.
Adds the HD keypath (example: `m/0'/0'/1') to the persisted CKeyMetadata object.
Currently, the used keypath scheme is still static and should be made dynamic/configurable in a different PR.
55 | @@ -56,8 +56,10 @@ def run_test (self): 56 | assert_equal(len(self.nodes[2].listunspent()), 0) 57 | 58 | # Send 21 BTC from 0 to 2 using sendtoaddress call. 59 | - self.nodes[0].sendtoaddress(self.nodes[2].getnewaddress(), 11) 60 | + addr = self.nodes[2].getnewaddress() 61 | + self.nodes[0].sendtoaddress(addr, 11)
Can you please fix the comment above? You are sending 11 BTC but the comment says 21 BTC.
Fixed.
validateaddress doc needs update as well.
@MarcoFalke: thanks. Added mentioning in the validateaddress help.
59 | - self.nodes[0].sendtoaddress(self.nodes[2].getnewaddress(), 11) 60 | + # Send 11 BTC from 0 to 2 using sendtoaddress call. 61 | + addr = self.nodes[2].getnewaddress() 62 | + self.nodes[0].sendtoaddress(addr, 11) 63 | self.nodes[0].sendtoaddress(self.nodes[2].getnewaddress(), 10) 64 | + assert(self.nodes[2].validateaddress(addr)["hdkeypath"] == "m/0'/0'/1'")
Not sure about this one but I feel we could create a fresh rpc-test/hd-wallet.py or wallet-hd.py, as I expect the hd functionality will be extended further.
In the future it would be easier to extend the hd test if it was a separate file and we wouldn't need to fiddle with the already bloated wallet.py
Yes. As soon as we have an bip32 import function (start a wallet with given xpriv) this makes sense. Without that, it's hard to cover the new hd features in tests. For this little change I guess it would be an overkill to start the a new test-script.
I think it is wrong to use wallet.py to test HD behavior. Instead, we should set -usehd=0 for the wallet tests and create a separate file for HD test. Otherwise, the legacy wallet is completely untested.
Please rebase on #8309 when merged and move this check over to the other test script.
I think this conflicts with key origin which is for better or worse being used in the wild.
Closing in favor of #8323