[tests] Don't restrict MAX_NODES based on the list of pre-computed addresses
Summary:
The MAX_NODE constant from the test framework is used to compute the port number for the p2p interface and limit the number of network threads the framework can start. But the same constant is used to assert that no test is using more deterministic key that defined in the TestNode, which is completely unrelated. This means that MAX_NODE cannot be increased without pre computing a lot of keys even if no test is using more than the actual 12 defined.
This diff decorrelates the constant from the number of deterministic keys so MAX_NODE can be increased without having to extend the keys at the same time, while improving the error message in case of misuse. This will make it possible to increase MAX_NODES in the future to add more outbound peer slots to the node, which will help gathering avalanche node addresses.
There is no change in behavior since no test is actually using more than 12 nodes.
Ref T1696.
Test Plan:
in util.py, increase MAX_NODES to something larger (I used 42, of course), then:
ninja check-functional-extended
Reviewers: #bitcoin_abc, PiRK
Reviewed By: #bitcoin_abc, PiRK
Maniphest Tasks: T1696
Differential Revision: https://reviews.bitcoinabc.org/D10852