mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-26 15:36:19 +01:00
Merge bitcoin/bitcoin#30512: net: Log accepted connection after m_nodes.push_back; Fix intermittent test issue
fa3ea3b83ctest: Fix intermittent issue in p2p_v2_misbehaving.py (MarcoFalke)55555574d1net: Log accepted connection after m_nodes.push_back (MarcoFalke) Pull request description: Fix the two issues reported in https://github.com/bitcoin/bitcoin/pull/30468/files#r1688444784: * Delay a debug log line for consistency. * Fix an intermittent test issue. They are completely separate fixes, but both `net` related. ACKs for top commit: 0xB10C: Code Review ACKfa3ea3b83cstratospher: tested ACKfa3ea3b. Tree-SHA512: cd6b6e164b317058a305a5c3e38c56c9a814a7469039e1143f1d7addfbc91b0a28506873356b373d97448b46cb6fbe94a1309df82e34c855540b241a09489e8b
This commit is contained in:
@@ -140,7 +140,8 @@ class EncryptedP2PMisbehaving(BitcoinTestFramework):
|
||||
node0.setmocktime(int(time.time()))
|
||||
self.log.info('Sending first 4 bytes of ellswift which match network magic')
|
||||
self.log.info('If a response is received, assertion failure would happen in our custom data_received() function')
|
||||
peer1 = node0.add_p2p_connection(MisbehavingV2Peer(TestType.EARLY_KEY_RESPONSE), wait_for_verack=False, send_version=False, supports_v2_p2p=True, wait_for_v2_handshake=False)
|
||||
with node0.wait_for_new_peer():
|
||||
peer1 = node0.add_p2p_connection(MisbehavingV2Peer(TestType.EARLY_KEY_RESPONSE), wait_for_verack=False, send_version=False, supports_v2_p2p=True, wait_for_v2_handshake=False)
|
||||
peer1.send_raw_message(MAGIC_BYTES['regtest'])
|
||||
self.log.info('Sending remaining ellswift and garbage which are different from V1_PREFIX. Since a response is')
|
||||
self.log.info('expected now, our custom data_received() function wouldn\'t result in assertion failure')
|
||||
|
||||
Reference in New Issue
Block a user