test: Fix intermittent issue in p2p_sendtxrcncl.py

This commit is contained in:
MacroFake 2022-10-24 16:07:19 +02:00
parent 3db23fd821
commit fa590cfaae
No known key found for this signature in database
GPG Key ID: CE2B75697E69A548

View File

@ -132,12 +132,10 @@ class SendTxRcnclTest(BitcoinTestFramework):
peer.wait_for_disconnect()
self.log.info('sending SENDTXRCNCL after sending VERACK triggers a disconnect')
# We use PeerNoVerack even though verack is sent right after, to make sure it was actually
# sent before sendtxrcncl is sent.
peer = self.nodes[0].add_p2p_connection(PeerNoVerack(), send_version=True, wait_for_verack=False)
peer.send_and_ping(msg_verack())
peer.send_message(create_sendtxrcncl_msg())
peer.wait_for_disconnect()
peer = self.nodes[0].add_p2p_connection(P2PInterface())
with self.nodes[0].assert_debug_log(["sendtxrcncl received after verack"]):
peer.send_message(create_sendtxrcncl_msg())
peer.wait_for_disconnect()
self.log.info('SENDTXRCNCL without WTXIDRELAY is ignored (recon state is erased after VERACK)')
peer = self.nodes[0].add_p2p_connection(PeerNoVerack(wtxidrelay=False), send_version=True, wait_for_verack=False)