diff options
author | merge-script <fanquake@gmail.com> | 2024-08-05 14:51:39 +0100 |
---|---|---|
committer | merge-script <fanquake@gmail.com> | 2024-08-05 14:51:39 +0100 |
commit | 42326b0fa46a67ad278cef7709a29feb05ce0110 (patch) | |
tree | caef8eaad9df55c4c3b83792fc59f6ff516e43d7 /test | |
parent | d15d95c5cc6fd1d06bb6531e3e0a046488e6f356 (diff) | |
parent | fa3ea3b83c6a4c9726a17f2a48bbdb77f944bf6c (diff) |
Merge bitcoin/bitcoin#30512: net: Log accepted connection after m_nodes.push_back; Fix intermittent test issue
fa3ea3b83c6a4c9726a17f2a48bbdb77f944bf6c test: Fix intermittent issue in p2p_v2_misbehaving.py (MarcoFalke)
55555574d105f6c529c5c966c3c971c9db5ab786 net: 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 ACK fa3ea3b83c6a4c9726a17f2a48bbdb77f944bf6c
stratospher:
tested ACK fa3ea3b.
Tree-SHA512: cd6b6e164b317058a305a5c3e38c56c9a814a7469039e1143f1d7addfbc91b0a28506873356b373d97448b46cb6fbe94a1309df82e34c855540b241a09489e8b
Diffstat (limited to 'test')
-rwxr-xr-x | test/functional/p2p_v2_misbehaving.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/functional/p2p_v2_misbehaving.py b/test/functional/p2p_v2_misbehaving.py index 2bc7b43e1f..0af96a4f8c 100755 --- a/test/functional/p2p_v2_misbehaving.py +++ b/test/functional/p2p_v2_misbehaving.py @@ -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') |