@@ -346,16 +346,22 @@ def has_block(index):
346346
347347 self .log .info ("Success" )
348348
349- def wallet_test (self ):
349+ def test_wallet_rescan (self ):
350350 # check that the pruning node's wallet is still in good shape
351351 self .log .info ("Stop and start pruning node to trigger wallet rescan" )
352352 self .restart_node (2 , extra_args = ["-prune=550" ])
353- self .log .info ("Success" )
353+
354+ wallet_info = self .nodes [2 ].getwalletinfo ()
355+ assert_equal (wallet_info ["scanning" ], False )
356+ assert_equal (wallet_info ["lastprocessedblock" ]["height" ], self .nodes [2 ].getblockcount ())
354357
355358 # check that wallet loads successfully when restarting a pruned node after IBD.
356359 # this was reported to fail in #7494.
357360 self .restart_node (5 , extra_args = ["-prune=550" , "-blockfilterindex=1" ]) # restart to trigger rescan
358- self .log .info ("Success" )
361+
362+ wallet_info = self .nodes [5 ].getwalletinfo ()
363+ assert_equal (wallet_info ["scanning" ], False )
364+ assert_equal (wallet_info ["lastprocessedblock" ]["height" ], self .nodes [2 ].getblockcount ())
359365
360366 def run_test (self ):
361367 self .log .info ("Warning! This test requires 4GB of disk space" )
@@ -469,7 +475,7 @@ def run_test(self):
469475
470476 if self .is_wallet_compiled ():
471477 self .log .info ("Test wallet re-scan" )
472- self .wallet_test ()
478+ self .test_wallet_rescan ()
473479
474480 self .log .info ("Test it's not possible to rescan beyond pruned data" )
475481 self .test_rescan_blockchain ()
0 commit comments