mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 23:03:45 +01:00
Merge bitcoin/bitcoin#34060: test: fix race condition in p2p_v2_misbehaving.py peerid assertion
09dfa4d3f8test: fix race condition in p2p_v2_misbehaving.py peerid assertion (stratospher) Pull request description: Remove the hard-coded peer id from the debug message in `p2p_v2_misbehaving.py`. asyncio's non-deterministic task scheduling might cause [peer2](938d7aacab/test/functional/p2p_v2_misbehaving.py (L181))'s connection to happen before [peer1](938d7aacab/test/functional/p2p_v2_misbehaving.py (L179))'s. since we test that peer2 [remains connected](938d7aacab/test/functional/p2p_v2_misbehaving.py (L182)), any disconnection must originate from peer1, making the specific peer id not necessary for test correctness. so we can remove the hard coded peer id from the expected debug log message. Fixes #34035. ACKs for top commit: maflcko: lgtm ACK09dfa4d3f8mzumsande: Code Review ACK09dfa4d3f8Tree-SHA512: 542b08ddae09db7454e8c08b1d26aade50a53c2505683df99556cf071a6a38195b64f8700f6db3f4e1b318497fc4b5232246ad4e9d6f3af45fad83e333fa91fb
This commit is contained in:
@@ -161,8 +161,8 @@ class EncryptedP2PMisbehaving(BitcoinTestFramework):
|
||||
node0 = self.nodes[0]
|
||||
expected_debug_message = [
|
||||
[], # EARLY_KEY_RESPONSE
|
||||
["V2 transport error: missing garbage terminator, peer=1"], # EXCESS_GARBAGE
|
||||
["V2 handshake timeout, disconnecting peer=3"], # WRONG_GARBAGE_TERMINATOR
|
||||
["V2 transport error: missing garbage terminator"], # EXCESS_GARBAGE
|
||||
["V2 handshake timeout, disconnecting peer"], # WRONG_GARBAGE_TERMINATOR
|
||||
["V2 transport error: packet decryption failure"], # WRONG_GARBAGE
|
||||
["V2 transport error: packet decryption failure"], # SEND_NO_AAD
|
||||
[], # SEND_NON_EMPTY_VERSION_PACKET
|
||||
|
||||
Reference in New Issue
Block a user