aboutsummaryrefslogtreecommitdiff
path: root/test/functional/p2p_net_deadlock.py
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2023-10-29 10:11:24 +0100
committerfanquake <fanquake@gmail.com>2023-10-29 10:14:59 +0100
commitf0284706546e5ae1118f52c5d96e1e7c90d71063 (patch)
tree378c3ddb8c4223def2f7928c3d04d8391d57b901 /test/functional/p2p_net_deadlock.py
parent42b0d5f59b868e8ed5ae6c7df3bc133f79e3bfb3 (diff)
parentfe3ac3700d31a6329056fee983d91dd8e4c987c1 (diff)
downloadbitcoin-f0284706546e5ae1118f52c5d96e1e7c90d71063.tar.xz
Merge bitcoin/bitcoin#28727: test: replace random_bytes with random.randbytes
fe3ac3700d31a6329056fee983d91dd8e4c987c1 test: replace random_bytes with randbytes #28720 (ns-xvrn) Pull request description: With Python upgraded to 3.9 replaced the `random_bytes` function in util of functional tests and replaced it's usage with `random.randbytes`. Closes #28720. ACKs for top commit: maflcko: lgtm ACK fe3ac3700d31a6329056fee983d91dd8e4c987c1 BrandonOdiwuor: ACK fe3ac3700d31a6329056fee983d91dd8e4c987c1 stickies-v: ACK fe3ac3700d31a6329056fee983d91dd8e4c987c1, thanks for picking this up kristapsk: utACK fe3ac3700d31a6329056fee983d91dd8e4c987c1 Tree-SHA512: f65a75e73ebd840c2936eb133d42bccd552f25b717c8ca25c18d06e0593e12f292389cfcc0a0b0759004b67a46ea0c8ac237973ef90f246139778230be1e64e1
Diffstat (limited to 'test/functional/p2p_net_deadlock.py')
-rwxr-xr-xtest/functional/p2p_net_deadlock.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/p2p_net_deadlock.py b/test/functional/p2p_net_deadlock.py
index f69fe52146..1a357b944b 100755
--- a/test/functional/p2p_net_deadlock.py
+++ b/test/functional/p2p_net_deadlock.py
@@ -5,7 +5,7 @@
import threading
from test_framework.test_framework import BitcoinTestFramework
-from test_framework.util import random_bytes
+from random import randbytes
class NetDeadlockTest(BitcoinTestFramework):
@@ -18,7 +18,7 @@ class NetDeadlockTest(BitcoinTestFramework):
node1 = self.nodes[1]
self.log.info("Simultaneously send a large message on both sides")
- rand_msg = random_bytes(4000000).hex()
+ rand_msg = randbytes(4000000).hex()
thread0 = threading.Thread(target=node0.sendmsgtopeer, args=(0, "unknown", rand_msg))
thread1 = threading.Thread(target=node1.sendmsgtopeer, args=(0, "unknown", rand_msg))