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:
dustinface 2021-10-05 18:47:23 +02:00 committed by GitHub
parent acbbd3a3dd
commit 2127634aab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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