Travis reports a false positive on master at the moment:
0test/functional/data/invalid_txs.py:217: unused variable 'DisabledOpcodeTemplates' (60% confidence)
1
2^---- failure generated from test/lint/lint-python-dead-code.sh
I have to agree with the linter that it’s slightly confusing code, as DisabledOpcodeTemplates
(introduced in 0c62e3aa73839e97e65a3155e06a98d84b700a1e, #14696) is not used directly, but the objects created here are definitely used in iter_all_templates
by iterating over the subclasses.
e.g.
0…
1$ test/functional/p2p_invalid_tx.py
22019-09-18T15:28:40.922000Z TestFramework (INFO): Testing invalid transaction: DisabledOpcode_OP_CAT
32019-09-18T15:28:41.026000Z TestFramework (INFO): Reconnecting to peer
42019-09-18T15:28:41.078000Z TestFramework (INFO): Testing invalid transaction: DisabledOpcode_OP_SUBSTR
52019-09-18T15:28:41.182000Z TestFramework (INFO): Reconnecting to peer
62019-09-18T15:28:41.233000Z TestFramework (INFO): Testing invalid transaction: DisabledOpcode_OP_LEFT
72019-09-18T15:28:41.338000Z TestFramework (INFO): Reconnecting to peer
82019-09-18T15:28:41.389000Z TestFramework (INFO): Testing invalid transaction: DisabledOpcode_OP_RIGHT
92019-09-18T15:28:41.494000Z TestFramework (INFO): Reconnecting to peer
102019-09-18T15:28:41.545000Z TestFramework (INFO): Testing invalid transaction: DisabledOpcode_OP_INVERT
112019-09-18T15:28:41.649000Z TestFramework (INFO): Reconnecting to peer
122019-09-18T15:28:41.701000Z TestFramework (INFO): Testing invalid transaction: DisabledOpcode_OP_AND
132019-09-18T15:28:41.805000Z TestFramework (INFO): Reconnecting to peer
142019-09-18T15:28:41.856000Z TestFramework (INFO): Testing invalid transaction: DisabledOpcode_OP_OR
152019-09-18T15:28:41.960000Z TestFramework (INFO): Reconnecting to peer
162019-09-18T15:28:42.012000Z TestFramework (INFO): Testing invalid transaction: DisabledOpcode_OP_XOR
172019-09-18T15:28:42.116000Z TestFramework (INFO): Reconnecting to peer
182019-09-18T15:28:42.167000Z TestFramework (INFO): Testing invalid transaction: DisabledOpcode_OP_2MUL
192019-09-18T15:28:42.271000Z TestFramework (INFO): Reconnecting to peer
202019-09-18T15:28:42.322000Z TestFramework (INFO): Testing invalid transaction: DisabledOpcode_OP_2DIV
212019-09-18T15:28:42.427000Z TestFramework (INFO): Reconnecting to peer
222019-09-18T15:28:42.479000Z TestFramework (INFO): Testing invalid transaction: DisabledOpcode_OP_MUL
232019-09-18T15:28:42.583000Z TestFramework (INFO): Reconnecting to peer
24…