mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2024-09-11 18:58:59 +03:00
benchmarks: Use secrets.token_bytes
instead of random.randbytes
(#8724)
Latter is only available in python >= 3.9 and lets pre-commit fail for lower versions.
This commit is contained in:
parent
acbbd3a3dd
commit
2127634aab
@ -1,5 +1,6 @@
|
||||
import asyncio
|
||||
import random
|
||||
import secrets
|
||||
from time import time
|
||||
from pathlib import Path
|
||||
from chia.full_node.coin_store import CoinStore
|
||||
@ -32,7 +33,7 @@ async def setup_db() -> DBWrapper:
|
||||
|
||||
|
||||
def rand_hash() -> bytes32:
|
||||
return random.randbytes(32)
|
||||
return secrets.token_bytes(32)
|
||||
|
||||
|
||||
def make_coin() -> Coin:
|
||||
|
Loading…
Reference in New Issue
Block a user