diff options
author | John Newbery <john@johnnewbery.com> | 2018-04-17 17:42:31 -0400 |
---|---|---|
committer | John Newbery <john@johnnewbery.com> | 2018-05-19 11:21:20 -0400 |
commit | 79053a5f2b26ee3dfd9a0bb3fd01ac4733fc92b5 (patch) | |
tree | 5b06058f3c0e14480b2ca0a010af0ed66231f8bb /test | |
parent | c75c351419dac3dfe9578604ea5b2f7599452b4a (diff) |
[rpc] [wallet] Add 'hdmasterkeyid' alias return values.
Restores the return value in getwalletinfo() and getaddressinfo()
RPC methods for backwards compatibility
Diffstat (limited to 'test')
-rwxr-xr-x | test/functional/wallet_hd.py | 3 | ||||
-rwxr-xr-x | test/functional/wallet_keypool.py | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/test/functional/wallet_hd.py b/test/functional/wallet_hd.py index afc20c5a91..86abe0ca99 100755 --- a/test/functional/wallet_hd.py +++ b/test/functional/wallet_hd.py @@ -30,6 +30,7 @@ class WalletHDTest(BitcoinTestFramework): # Make sure we use hd, keep masterkeyid masterkeyid = self.nodes[1].getwalletinfo()['hdseedid'] + assert_equal(masterkeyid, self.nodes[1].getwalletinfo()['hdmasterkeyid']) assert_equal(len(masterkeyid), 40) # create an internal key @@ -55,6 +56,7 @@ class WalletHDTest(BitcoinTestFramework): hd_info = self.nodes[1].getaddressinfo(hd_add) assert_equal(hd_info["hdkeypath"], "m/0'/0'/"+str(i)+"'") assert_equal(hd_info["hdseedid"], masterkeyid) + assert_equal(hd_info["hdmasterkeyid"], masterkeyid) self.nodes[0].sendtoaddress(hd_add, 1) self.nodes[0].generate(1) self.nodes[0].sendtoaddress(non_hd_add, 1) @@ -84,6 +86,7 @@ class WalletHDTest(BitcoinTestFramework): hd_info_2 = self.nodes[1].getaddressinfo(hd_add_2) assert_equal(hd_info_2["hdkeypath"], "m/0'/0'/"+str(i)+"'") assert_equal(hd_info_2["hdseedid"], masterkeyid) + assert_equal(hd_info_2["hdmasterkeyid"], masterkeyid) assert_equal(hd_add, hd_add_2) connect_nodes_bi(self.nodes, 0, 1) self.sync_all() diff --git a/test/functional/wallet_keypool.py b/test/functional/wallet_keypool.py index 66d382e4cd..1285515dfc 100755 --- a/test/functional/wallet_keypool.py +++ b/test/functional/wallet_keypool.py @@ -16,6 +16,7 @@ class KeyPoolTest(BitcoinTestFramework): addr_before_encrypting = nodes[0].getnewaddress() addr_before_encrypting_data = nodes[0].getaddressinfo(addr_before_encrypting) wallet_info_old = nodes[0].getwalletinfo() + assert_equal(wallet_info_old['hdseedid'], wallet_info_old['hdmasterkeyid']) assert(addr_before_encrypting_data['hdseedid'] == wallet_info_old['hdseedid']) # Encrypt wallet and wait to terminate @@ -26,6 +27,7 @@ class KeyPoolTest(BitcoinTestFramework): addr = nodes[0].getnewaddress() addr_data = nodes[0].getaddressinfo(addr) wallet_info = nodes[0].getwalletinfo() + assert_equal(wallet_info['hdseedid'], wallet_info['hdmasterkeyid']) assert(addr_before_encrypting_data['hdseedid'] != wallet_info['hdseedid']) assert(addr_data['hdseedid'] == wallet_info['hdseedid']) assert_raises_rpc_error(-12, "Error: Keypool ran out, please call keypoolrefill first", nodes[0].getnewaddress) |