test: remove unused constants in functional tests
Summary:
This mini-PR gets rid of constants in functional tests that are not used anymore. Found by vulture via the following script that has been lying around here locally for quite some time (I think it was once proposed by practicalswift, but I don't remember the concrete topic/PR):
#!/bin/sh for F in $(git ls-files -- "*.py"); do vulture "$F" | grep "unused variable"; done
I used the script to look for more unused variables and remove them. But note that it show mostly false positives (most likely because the test framework is not using "standard" python coding practices), so it is not a reliable way of finding unused variables.
I left some unused variables that will be removed by upcoming backports.
I also left a couple of unused variables that seem to document missing test coverage:
- BLOCKSIZE_TOO_LOW in abc_rpc_excessiveblock.py is an CLI error message that cannot be triggered via RPC
- RPC_FORK_PRIOR_FINALIZED_ERROR in abc-finalize-block.py is an error message that still exists in validation.cpp but is not tested
The constant removed in abc-schnormultisig.py is just an unused copy-pasta from abc-schnorr.py
This is a backport of core#20023
Test Plan: ninja check-functional-extended
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D10344