test: replace random_bytes with randbytes #28720

This commit is contained in:
ns-xvrn
2023-10-25 00:45:29 -04:00
parent 64879f4c03
commit fe3ac3700d
5 changed files with 35 additions and 44 deletions

View File

@@ -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))