64 | @@ -44,12 +65,48 @@ def run_test(self):
65 |
66 | # b'\x64' is OP_NOTIF
67 | # Transaction will be rejected with code 16 (REJECT_INVALID)
68 | + self.log.info('Test a transaction that is rejected')
69 | tx1 = create_transaction(block1.vtx[0], 0, b'\x64', 50 * COIN - 12000)
70 | - node.p2p.send_txs_and_test([tx1], node, success=False, reject_code=16, reject_reason=b'mandatory-script-verify-flag-failed (Invalid OP_IF construction)')
71 | + node.p2p.send_txs_and_test([tx1], node, success=False, expect_disconnect=True)
72 | + self.reconnect_p2p(additional_conn=True) # Add one more (that is later disconnected)
More test description would be helpful here (it took me a while to figure it out): Test confirms that mininode 1 doesn't get disconnected right away after sending the node an invalid orphan transaction. It then confirms mininode 1 is disconnected later when mininode 0 provides the missing parent which makes it possible to detect the orphan was invalid.
At least this explains the tx_withhold and tx_orphan_2_invalid parts of the new test. I still don't know why tx_orphan_1, tx_orphan_2_no_fee, and tx_orphan_2_valid are added and what they are testing for.