The naming of the failure
variable is unintuitive imo because the first time I read it, I assumed this is some returned failure object from some operation undergoing the test but that is not the case as per this comment in the make_spender()
.
https://github.com/bitcoin/bitcoin/blob/4c1906a500cacab385b09e780b54271b0addaf4b/test/functional/feature_taproot.py#L493
At the cost of being verbose, it could be called failure_overrides
or something similar because seeing around ~90 odd occurrences of this argument in the file does add some cognitive load for the reader over time.
However, this kind of change will increase the diff a bit and I can understand if the author is not inclined towards it in which case the commentary here can include the above mentioned context. I do see the term “failure condition” mentioned here already, maybe tying it up with the “failure” object could prove to be helpful.