Skip to content

Commit

Permalink
qa: Avoid checking reject code for now
Browse files Browse the repository at this point in the history
The node will often disconnect before sending a reject code. A more
robust solution would be to read from the debug log.
  • Loading branch information
MarcoFalke committed May 30, 2018
1 parent 472fe8a commit faac7a2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions test/functional/p2p_invalid_tx.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
)


REJECT_INVALID = 16

class InvalidTxRequestTest(BitcoinTestFramework):
def set_test_params(self):
self.num_nodes = 1
Expand Down Expand Up @@ -73,7 +71,7 @@ def run_test(self):
# and we get disconnected immediately
self.log.info('Test a transaction that is rejected')
tx1 = create_transaction(block1.vtx[0], 0, b'\x64' * 35, 50 * COIN - 12000)
node.p2p.send_txs_and_test([tx1], node, success=False, expect_disconnect=True, reject_code=REJECT_INVALID, reject_reason=b'mandatory-script-verify-flag-failed (Invalid OP_IF construction)')
node.p2p.send_txs_and_test([tx1], node, success=False, expect_disconnect=True)

# Make two p2p connections to provide the node with orphans
# * p2ps[0] will send valid orphan txs (one with low fee)
Expand Down

0 comments on commit faac7a2

Please sign in to comment.