18 addr_before_encrypting_data = nodes[0].
validateaddress(addr_before_encrypting)
20 assert(addr_before_encrypting_data[
'hdchainid'] == wallet_info_old[
'hdchainid'])
24 bitcoind_processes[0].wait()
26 nodes[0] =
start_node(0, self.options.tmpdir, [
'-usehd=1'])
31 assert(addr_before_encrypting_data[
'hdchainid'] == wallet_info[
'hdchainid'])
32 assert(addr_data[
'hdchainid'] == wallet_info[
'hdchainid'])
36 raise AssertionError(
'Keypool should be exhausted after one address')
37 except JSONRPCException
as e:
38 assert(e.error[
'code']==-12)
58 raise AssertionError(
'Keypool should be exhausted after six addresses')
59 except JSONRPCException
as e:
60 assert(e.error[
'code']==-12)
70 assert(len(addr) == 6)
74 raise AssertionError(
'Keypool should be exhausted after six addresses')
75 except JSONRPCException
as e:
76 assert(e.error[
'code']==-12)
91 raise AssertionError(
'Keypool should be exhausted after three addesses')
92 except JSONRPCException
as e:
93 assert(e.error[
'code']==-12)
102 print(
"Initializing test directory "+self.options.tmpdir)
108 if __name__ ==
'__main__':
UniValue getrawchangeaddress(const UniValue ¶ms, bool fHelp)
UniValue walletpassphrase(const UniValue ¶ms, bool fHelp)
UniValue keypoolrefill(const UniValue ¶ms, bool fHelp)
UniValue validateaddress(const UniValue ¶ms, bool fHelp)
def start_nodes(num_nodes, dirname, extra_args=None, rpchost=None, binary=None)
UniValue getnewaddress(const UniValue ¶ms, bool fHelp)
def initialize_chain_clean(test_dir, num_nodes)
UniValue getwalletinfo(const UniValue ¶ms, bool fHelp)
UniValue encryptwallet(const UniValue ¶ms, bool fHelp)
def start_node(i, dirname, extra_args=None, rpchost=None, timewait=None, binary=None)
UniValue generate(const UniValue ¶ms, bool fHelp)
def assert_equal(thing1, thing2)
UniValue walletlock(const UniValue ¶ms, bool fHelp)