mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-10-10 19:43:13 +02: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:
@@ -67,7 +67,8 @@ class MaxUploadTest(BitcoinTestFramework):
|
||||
p2p_conns = []
|
||||
|
||||
for _ in range(3):
|
||||
p2p_conns.append(self.nodes[0].add_p2p_connection(TestP2PConn()))
|
||||
# Don't use v2transport in this test (too slow with the unoptimized python ChaCha20 implementation)
|
||||
p2p_conns.append(self.nodes[0].add_p2p_connection(TestP2PConn(), supports_v2_p2p=False))
|
||||
|
||||
# Now mine a big block
|
||||
mine_large_block(self, self.wallet, self.nodes[0])
|
||||
@@ -148,7 +149,7 @@ class MaxUploadTest(BitcoinTestFramework):
|
||||
self.restart_node(0, ["-whitelist=download@127.0.0.1", "-maxuploadtarget=1"])
|
||||
|
||||
# Reconnect to self.nodes[0]
|
||||
peer = self.nodes[0].add_p2p_connection(TestP2PConn())
|
||||
peer = self.nodes[0].add_p2p_connection(TestP2PConn(), supports_v2_p2p=False)
|
||||
|
||||
#retrieve 20 blocks which should be enough to break the 1MB limit
|
||||
getdata_request.inv = [CInv(MSG_BLOCK, big_new_block)]
|
||||
|
Reference in New Issue
Block a user