fix systemrandom shuffle
parent
b424ef6674
commit
862b39c217
|
@ -63,8 +63,8 @@ class UploadPool:
|
||||||
if len(self._pool) != self._pool_size:
|
if len(self._pool) != self._pool_size:
|
||||||
raise PoolNotReady
|
raise PoolNotReady
|
||||||
|
|
||||||
final_pool: List[onionrtypes.BlockHash] = SystemRandom().shuffle(
|
final_pool: List[onionrtypes.BlockHash] = list(self._pool)
|
||||||
list(self._pool))
|
SystemRandom().shuffle(final_pool)
|
||||||
|
|
||||||
self._pool.clear()
|
self._pool.clear()
|
||||||
self.birthday = onionrutils.epoch.get_epoch()
|
self.birthday = onionrutils.epoch.get_epoch()
|
||||||
|
|
|
@ -55,7 +55,8 @@ class OnionrRunTestManager:
|
||||||
self.run_date: int = 0
|
self.run_date: int = 0
|
||||||
|
|
||||||
def run_tests(self):
|
def run_tests(self):
|
||||||
tests = SystemRandom.shuffle(list(RUN_TESTS))
|
tests = list(RUN_TESTS)
|
||||||
|
SystemRandom().shuffle(tests)
|
||||||
cur_time = epoch.get_epoch()
|
cur_time = epoch.get_epoch()
|
||||||
logger.info(f"Doing runtime tests at {cur_time}")
|
logger.info(f"Doing runtime tests at {cur_time}")
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
1602391371
|
1603376389
|
Loading…
Reference in New Issue