137@@ -138,11 +138,6 @@ def run_test(self):
138 # unsigned with redeem script
139 self.fail_accept(self.nodes[0], "mandatory-script-verify-flag", p2sh_ids[NODE_0][WIT_V0][0], False, witness_script(False, self.pubkey[0]))
140 self.fail_accept(self.nodes[0], "mandatory-script-verify-flag", p2sh_ids[NODE_0][WIT_V1][0], False, witness_script(True, self.pubkey[0]))
141- # signed
I think this whole block can be removed (self.log.info("Verify default node can't accept any witness format txs before fork")
downwards). The previuos self.fail_accept()
calls are testing transactions that are invalid both before and after the fork due to missing signatures.
This pull request changes the (rejection-/acceptance-) policy about segwit transactions that are otherwise valid, not about segwit transactions that are otherwise invalid. Personally I don’t see the advantage in removing those tests and I’d suggest to move the suggested changes into a separate pull request, since it seems unrelated to the changes in this pull request.
For the same reason as above, I think that including these tests is misleading for anyone reading the tests, since it implies that behaviour is different before and after segwit activation.
Thanks! Reworded the comment in the last commit
I still think these subtests should be moved to after segwit activation