|
|
@ -39,7 +39,7 @@ class WalletHDTest(BitcoinTestFramework): |
|
|
|
|
|
|
|
|
|
|
|
# create an internal key |
|
|
|
# create an internal key |
|
|
|
change_addr = self.nodes[1].getrawchangeaddress() |
|
|
|
change_addr = self.nodes[1].getrawchangeaddress() |
|
|
|
change_addrV= self.nodes[1].validateaddress(change_addr); |
|
|
|
change_addrV= self.nodes[1].validateaddress(change_addr) |
|
|
|
assert_equal(change_addrV["hdkeypath"], "m/0'/1'/0'") #first internal child key |
|
|
|
assert_equal(change_addrV["hdkeypath"], "m/0'/1'/0'") #first internal child key |
|
|
|
|
|
|
|
|
|
|
|
# Import a non-HD private key in the HD wallet |
|
|
|
# Import a non-HD private key in the HD wallet |
|
|
@ -67,7 +67,7 @@ class WalletHDTest(BitcoinTestFramework): |
|
|
|
|
|
|
|
|
|
|
|
# create an internal key (again) |
|
|
|
# create an internal key (again) |
|
|
|
change_addr = self.nodes[1].getrawchangeaddress() |
|
|
|
change_addr = self.nodes[1].getrawchangeaddress() |
|
|
|
change_addrV= self.nodes[1].validateaddress(change_addr); |
|
|
|
change_addrV= self.nodes[1].validateaddress(change_addr) |
|
|
|
assert_equal(change_addrV["hdkeypath"], "m/0'/1'/1'") #second internal child key |
|
|
|
assert_equal(change_addrV["hdkeypath"], "m/0'/1'/1'") #second internal child key |
|
|
|
|
|
|
|
|
|
|
|
self.sync_all() |
|
|
|
self.sync_all() |
|
|
@ -97,7 +97,7 @@ class WalletHDTest(BitcoinTestFramework): |
|
|
|
|
|
|
|
|
|
|
|
# send a tx and make sure its using the internal chain for the changeoutput |
|
|
|
# send a tx and make sure its using the internal chain for the changeoutput |
|
|
|
txid = self.nodes[1].sendtoaddress(self.nodes[0].getnewaddress(), 1) |
|
|
|
txid = self.nodes[1].sendtoaddress(self.nodes[0].getnewaddress(), 1) |
|
|
|
outs = self.nodes[1].decoderawtransaction(self.nodes[1].gettransaction(txid)['hex'])['vout']; |
|
|
|
outs = self.nodes[1].decoderawtransaction(self.nodes[1].gettransaction(txid)['hex'])['vout'] |
|
|
|
keypath = "" |
|
|
|
keypath = "" |
|
|
|
for out in outs: |
|
|
|
for out in outs: |
|
|
|
if out['value'] != 1: |
|
|
|
if out['value'] != 1: |
|
|
|