aboutsummaryrefslogtreecommitdiff
path: root/test/functional/p2p_invalid_messages.py
diff options
context:
space:
mode:
authorMartin Zumsande <mzumsande@gmail.com>2024-01-16 11:28:10 -0500
committerMartin Zumsande <mzumsande@gmail.com>2024-02-06 16:11:21 -0500
commit6e9e39da434f8dafacee4cba068daf499bdb4cc2 (patch)
treee6d5c82a513bae46dee8453bdb1fe1de22543ee5 /test/functional/p2p_invalid_messages.py
parent87549c8f89fe8c9f404b74c5a40b5ee54c5a966d (diff)
test: Don't use v2transport when it's too slow.
Sending multiple large messages is rather slow with the non-optimized python implementation of ChaCha20. Apart from the slowness, these tests would also run successfully with v2.
Diffstat (limited to 'test/functional/p2p_invalid_messages.py')
-rwxr-xr-xtest/functional/p2p_invalid_messages.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/functional/p2p_invalid_messages.py b/test/functional/p2p_invalid_messages.py
index 762e6c4688..40a69936bc 100755
--- a/test/functional/p2p_invalid_messages.py
+++ b/test/functional/p2p_invalid_messages.py
@@ -327,8 +327,10 @@ class InvalidMessagesTest(BitcoinTestFramework):
def test_resource_exhaustion(self):
self.log.info("Test node stays up despite many large junk messages")
- conn = self.nodes[0].add_p2p_connection(P2PDataStore())
- conn2 = self.nodes[0].add_p2p_connection(P2PDataStore())
+ # Don't use v2 here - the non-optimised encryption would take too long to encrypt
+ # the large messages
+ conn = self.nodes[0].add_p2p_connection(P2PDataStore(), supports_v2_p2p=False)
+ conn2 = self.nodes[0].add_p2p_connection(P2PDataStore(), supports_v2_p2p=False)
msg_at_size = msg_unrecognized(str_data="b" * VALID_DATA_LIMIT)
assert len(msg_at_size.serialize()) == MAX_PROTOCOL_MESSAGE_LENGTH