Rational for removal:
-
This is effectively a fatal error to miners regardless, there is no meaningful downside to removing this because getting an invalid template is not practically any worse than getting no template.
-
Due to cs_main locks this causes a large variance in GBT response times and further encourages undesirable workarounds such as validationless mining.
-
Invalid blocks are much more likely to originate from stratum server bugs, something like this is probably a better way to test block validity.
I’ve been running with this TestBlockValidity call removed in production for a few months at this point.