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):
138
138
assert_equal (wi ['keypoolsize_hd_internal' ], 100 )
139
139
assert_equal (wi ['keypoolsize' ], 100 )
140
140
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
+
141
151
# create a blank wallet
142
152
nodes [0 ].createwallet (wallet_name = 'w2' , blank = True , disable_private_keys = True )
143
153
w2 = nodes [0 ].get_wallet_rpc ('w2' )
You can’t perform that action at this time.
0 commit comments