mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-05 02:05:10 +01:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user