Summary
This PR replaces the TODO comment in wallet_assumeutxo.py (line 242) with actual test assertions that verify node and wallet behavior after a restart during assumeutxo background sync.
Changes
The new tests verify:
- Two chainstates exist (background validation not complete)
- Background chainstate is still at
START_HEIGHT - Snapshot chainstate has synced to at least
PAUSE_HEIGHT - Wallets cannot be loaded after restart (expected behavior)
- Wallet backup from before snapshot height cannot be restored
Motivation
During implementation, I discovered that wallets cannot be loaded after a node restart during assumeutxo background sync. This is expected behavior because:
- The wallet loading code checks if required blocks are available for rescanning
- During assumeutxo background sync, blocks before the snapshot are not available
- This applies to all wallets, including watch-only wallets created at the snapshot height
This is a valuable test addition because it documents this expected behavior and ensures it doesn’t regress. Users should be aware that if they restart their node during assumeutxo background sync, they won’t be able to load their wallets until the background sync completes.
Related
refs #28648
Addresses the TODO comment that was originally added as part of the assumeutxo wallet test implementation.