mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-19 13:27:35 +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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue