@@ -235,12 +235,7 @@ def copy_split_hd():
235235 seed_id = bytearray (seed_id )
236236 seed_id .reverse ()
237237 old_kvs = new_kvs
238- # First 2 keys should still be non-HD
239- for i in range (0 , 2 ):
240- info = wallet .getaddressinfo (wallet .getnewaddress ())
241- assert 'hdkeypath' not in info
242- assert 'hdseedid' not in info
243- # Next key should be HD
238+ # New keys should be HD (the two old keys have been flushed)
244239 info = wallet .getaddressinfo (wallet .getnewaddress ())
245240 assert_equal (seed_id .hex (), info ['hdseedid' ])
246241 assert_equal ('m/0\' /0\' /0\' ' , info ['hdkeypath' ])
@@ -291,14 +286,7 @@ def copy_split_hd():
291286 hd_chain_version , external_counter , seed_id , internal_counter = struct .unpack ('<iI20sI' , hd_chain )
292287 assert_equal (2 , hd_chain_version )
293288 assert_equal (2 , internal_counter )
294- # Drain the keypool by fetching one external key and one change key. Should still be the same keypool
295- info = wallet .getaddressinfo (wallet .getnewaddress ())
296- assert 'hdseedid' not in info
297- assert 'hdkeypath' not in info
298- info = wallet .getaddressinfo (wallet .getrawchangeaddress ())
299- assert 'hdseedid' not in info
300- assert 'hdkeypath' not in info
301- # The next addresses are HD and should be on different HD chains
289+ # The next addresses are HD and should be on different HD chains (the one remaining key in each pool should have been flushed)
302290 info = wallet .getaddressinfo (wallet .getnewaddress ())
303291 ext_id = info ['hdseedid' ]
304292 assert_equal ('m/0\' /0\' /0\' ' , info ['hdkeypath' ])
0 commit comments