Almost all test scripts currently need to override the __init__()
method. When they do that they need to call into super().__init__() as
the base class does some generic initialization.
This commit makes the base class __init__() call into set_test_params()
method. Individual test cases can override set_test_params() to setup
their test parameters.
Github-Pull: #11121
Rebased-From: 5448a1471d
Separates the act of creating a TestNode object from starting the node.
The test_framework now keeps track of its list of TestNodes, and test
writers can call start_node() and stop_node() without having to update
the self.nodes list.
Github-Pull: #11121
Rebased-From: 36b6268670
The setban() RPC was returning misleading or incorrect error
codes (for example RPC_CLIENT_NODE_ALREADY_ADDED when an invalid IP
address was entered). This commit fixes those error codes:
- RPC_CLIENT_INVALID_IP_OR_SUBNET should be returned if the client
enters an invalid IP address or subnet.
This commit also updates the test cases to explicitly test the error code.
This commit also adds a testcase for trying to setban on an invalid subnet.
This commit fixes the module-level docstrings for the tests and helper
modules in qa. Many of these tests were uncommented previously - this
commit ensures that every test case has at least a minimum level of
commenting.