Motivation
Currently tests with a locked wallet have to verbosely specify a long timeout and then lock the wallet again, once they are done testing the unlocked part. This is fragile, because the wallet may lock earlier, or the dev may forget to re-lock the wallet when done.
All issues should be fixed with a context manager.
Possible solution
A context manager. See also #28403 (review)
Useful Skills
- Compiling Bitcoin Core from source
- Running the C++ unit tests and the Python functional tests
- Python 3 contextlib
Guidance for new contributors
Want to work on this issue?
For guidance on contributing, please read CONTRIBUTING.md before opening your pull request.