The need for this change was ideated during the review of PR 34857.
- The node doesn’t need to be restarted (with reindex or without) because rescanblockchain RPC already updates the wallet birthtime, which is the property that needs to be tested - this allows us to rename the test class to highlight the change in intention of the test.
- Generate 9 blocks fewer to fund the miner wallet.
- Generate 30 blocks fewer to accommodate for the wallet scan start time while importing descriptor with “now” timestamp.
- Use common bumpmocktime helper instead of custom advance_time function.
- Unload miner wallet before 20 blocks generation to avoid notifications from being processed by that wallet.
- Change the order of arguments in assert_equal for consistency.
- Add few constant and verbose comments for test clarity.
Note: This overhaul helps in reducing the time taken by the test from 2s to 0s as observed in few runs.