File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -138,6 +138,16 @@ def run_test(self):
138138 assert_equal (wi ['keypoolsize_hd_internal' ], 100 )
139139 assert_equal (wi ['keypoolsize' ], 100 )
140140
141+ if not self .options .descriptors :
142+ # Check that newkeypool entirely flushes the keypool
143+ start_keypath = nodes [0 ].getaddressinfo (nodes [0 ].getnewaddress ())['hdkeypath' ]
144+ nodes [0 ].newkeypool ()
145+ end_keypath = nodes [0 ].getaddressinfo (nodes [0 ].getnewaddress ())['hdkeypath' ]
146+ # The new keypath index should be 100 more than the old one
147+ keypath_prefix = start_keypath .rsplit ('/' , 1 )[0 ]
148+ new_index = int (start_keypath .rsplit ('/' , 1 )[1 ][:- 1 ]) + 100
149+ assert_equal (end_keypath , keypath_prefix + '/' + str (new_index ) + '\' ' )
150+
141151 # create a blank wallet
142152 nodes [0 ].createwallet (wallet_name = 'w2' , blank = True , disable_private_keys = True )
143153 w2 = nodes [0 ].get_wallet_rpc ('w2' )
You can’t perform that action at this time.
0 commit comments