This ensures TestFramework default parameters are set before setup is called.
A child class will therefore have access to defaults when overriding setup.
In our codebase, this was already achieved by the change in D1974 which move d`set_test_params` into main() after parsing arguments. This commit makes our codebase more similar to Core, while keeping our ordering of method calls: parse_args before set_test_params.
This is a backport of Core PR17288 [5/7]
It is inspired by the following 2 commits while taking into account changes introduced in D1974:
- https://github.com/bitcoin/bitcoin/pull/17288/commits/2ab01462f48b2d4e0d03ba842c3af8851c67c6f1
- https://github.com/bitcoin/bitcoin/pull/17288/commits/5155602a636c323424f75272ccec38588b3d71cd
Depends on D8244