test: Check debug log as well in p2p_sendtxrcncl.py

pull/26381/head
MacroFake 2 years ago
parent fae0439486
commit fa3da8307b
No known key found for this signature in database
GPG Key ID: CE2B75697E69A548

@ -107,6 +107,7 @@ class SendTxRcnclTest(BitcoinTestFramework):
peer.send_message(create_sendtxrcncl_msg())
self.wait_until(lambda : "sendtxrcncl" in self.nodes[0].getpeerinfo()[-1]["bytesrecv_per_msg"])
self.log.info('second SENDTXRCNCL triggers a disconnect')
with self.nodes[0].assert_debug_log(["(sendtxrcncl received from already registered peer); disconnecting"]):
peer.send_message(create_sendtxrcncl_msg())
peer.wait_for_disconnect()
@ -115,12 +116,14 @@ class SendTxRcnclTest(BitcoinTestFramework):
sendtxrcncl_no_role.initiator = False
sendtxrcncl_no_role.responder = False
peer = self.nodes[0].add_p2p_connection(PeerNoVerack(), send_version=True, wait_for_verack=False)
with self.nodes[0].assert_debug_log(["txreconciliation protocol violation"]):
peer.send_message(sendtxrcncl_no_role)
peer.wait_for_disconnect()
self.log.info('SENDTXRCNCL with initiator=0 and responder=1 from inbound triggers a disconnect')
sendtxrcncl_wrong_role = create_sendtxrcncl_msg(initiator=False)
peer = self.nodes[0].add_p2p_connection(PeerNoVerack(), send_version=True, wait_for_verack=False)
with self.nodes[0].assert_debug_log(["txreconciliation protocol violation"]):
peer.send_message(sendtxrcncl_wrong_role)
peer.wait_for_disconnect()
@ -128,6 +131,7 @@ class SendTxRcnclTest(BitcoinTestFramework):
sendtxrcncl_low_version = create_sendtxrcncl_msg()
sendtxrcncl_low_version.version = 0
peer = self.nodes[0].add_p2p_connection(PeerNoVerack(), send_version=True, wait_for_verack=False)
with self.nodes[0].assert_debug_log(["txreconciliation protocol violation"]):
peer.send_message(sendtxrcncl_low_version)
peer.wait_for_disconnect()
@ -162,6 +166,7 @@ class SendTxRcnclTest(BitcoinTestFramework):
self.log.info('SENDTXRCNCL if block-relay-only triggers a disconnect')
peer = self.nodes[0].add_outbound_p2p_connection(
PeerNoVerack(), wait_for_verack=False, p2p_idx=3, connection_type="block-relay-only")
with self.nodes[0].assert_debug_log(["we indicated no tx relay; disconnecting"]):
peer.send_message(create_sendtxrcncl_msg(initiator=False))
peer.wait_for_disconnect()

Loading…
Cancel
Save