mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
Merge 43704827b4 into merged_master (Bitcoin PR bitcoin/bitcoin#28211)
This commit is contained in:
commit
149eb7d34e
8 changed files with 16 additions and 18 deletions
|
|
@ -299,10 +299,10 @@ def sha256sum_file(filename):
|
|||
return h.digest()
|
||||
|
||||
|
||||
# TODO: Remove and use random.randbytes(n) instead, available in Python 3.9
|
||||
# TODO: Remove and use random.randbytes(n) directly
|
||||
def random_bytes(n):
|
||||
"""Return a random bytes object of length n."""
|
||||
return bytes(random.getrandbits(8) for i in range(n))
|
||||
return random.randbytes(n)
|
||||
|
||||
|
||||
# RPC/P2P connection constants and functions
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue