Merge 43704827b4 into merged_master (Bitcoin PR bitcoin/bitcoin#28211)

This commit is contained in:
Byron Hambly 2025-08-08 08:06:57 +02:00
commit 149eb7d34e
No known key found for this signature in database
GPG key ID: DE8F6EA20A661697
8 changed files with 16 additions and 18 deletions

View file

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

View file

@ -7,13 +7,11 @@ To run linters locally with the same versions as the CI environment, use the inc
Dockerfile:
```sh
DOCKER_BUILDKIT=1 docker build -t bitcoin-linter --file "./ci/lint_imagefile" ./
docker run --rm -v $(pwd):/bitcoin -it bitcoin-linter
DOCKER_BUILDKIT=1 docker build -t bitcoin-linter --file "./ci/lint_imagefile" ./ && docker run --rm -v $(pwd):/bitcoin -it bitcoin-linter
```
After building the container once, you can simply run the last command any time you
want to lint.
Building the container can be done every time, because it is fast when the
result is cached and it prevents issues when the image changes.
check-doc.py