aboutsummaryrefslogtreecommitdiff
path: root/test/functional/p2p_invalid_tx.py
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2018-08-21 19:23:21 -0400
committerMarcoFalke <falke.marco@gmail.com>2018-10-24 22:01:31 -0400
commit06544faff0164051d2654d6aabb86f555fd2e86b (patch)
tree432e97ff9e6e406c376eb634acae18eb5041d67e /test/functional/p2p_invalid_tx.py
parent5b47b8efd48d233a5f7c12d1d7713dcd2f616255 (diff)
downloadbitcoin-06544faff0164051d2654d6aabb86f555fd2e86b.tar.xz
qa: Add TestNode::assert_debug_log
Github-Pull: #14024 Rebased-From: fa3e9f7627784ee00980590e5bf044a0e1249999
Diffstat (limited to 'test/functional/p2p_invalid_tx.py')
-rwxr-xr-xtest/functional/p2p_invalid_tx.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/functional/p2p_invalid_tx.py b/test/functional/p2p_invalid_tx.py
index 0aa5e21103..12bc62131f 100755
--- a/test/functional/p2p_invalid_tx.py
+++ b/test/functional/p2p_invalid_tx.py
@@ -136,11 +136,16 @@ class InvalidTxRequestTest(BitcoinTestFramework):
# restart node with sending BIP61 messages disabled, check that it disconnects without sending the reject message
self.log.info('Test a transaction that is rejected, with BIP61 disabled')
- self.restart_node(0, ['-enablebip61=0','-persistmempool=0'])
+ self.restart_node(0, ['-enablebip61=0', '-persistmempool=0'])
self.reconnect_p2p(num_connections=1)
- node.p2p.send_txs_and_test([tx1], node, success=False, expect_disconnect=True)
+ with node.assert_debug_log(expected_msgs=[
+ "{} from peer=0 was not accepted: mandatory-script-verify-flag-failed (Invalid OP_IF construction) (code 16)".format(tx1.hash),
+ "disconnecting peer=0",
+ ]):
+ node.p2p.send_txs_and_test([tx1], node, success=False, expect_disconnect=True)
# send_txs_and_test will have waited for disconnect, so we can safely check that no reject has been received
assert_equal(node.p2p.reject_code_received, None)
+
if __name__ == '__main__':
InvalidTxRequestTest().main()