mirror of
https://github.com/LBRYFoundation/lbry-sdk.git
synced 2025-08-23 09:17:23 +00:00
Merge branch 'fix-ripemd160-lbfoundation' of https://github.com/Brian496/lbry-sdk
This commit is contained in:
commit
cf4c65b782
2 changed files with 21 additions and 1 deletions
13
README.md
13
README.md
|
@ -54,3 +54,16 @@ The documentation for the API can be found [here](https://lbry.tech/api/sdk).
|
|||
Daemon defaults, ports, and other settings are documented [here](https://lbry.tech/resources/daemon-settings).
|
||||
|
||||
Settings can be configured using a daemon-settings.yml file. An example can be found [here](https://github.com/lbryio/lbry-sdk/blob/master/example_daemon_settings.yml).
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Error: unsupported hash type 'ripemd160'
|
||||
|
||||
If you see this error when running `lbrynet start`, it likely means your OpenSSL or Python installation is missing RIPEMD160 support.
|
||||
|
||||
To fix it:
|
||||
|
||||
- Ensure you are using a version of Python compiled with OpenSSL support.
|
||||
- On Ubuntu/Debian, try: `sudo apt install libssl-dev` and reinstall Python.
|
||||
- Alternatively, use a precompiled Python version (e.g., via `pyenv install 3.8.18` after `libssl-dev` is installed).
|
||||
|
||||
|
|
|
@ -15,11 +15,18 @@ def sha512(x):
|
|||
|
||||
def ripemd160(x):
|
||||
""" Simple wrapper of hashlib ripemd160. """
|
||||
h = hashlib.new('ripemd160')
|
||||
try:
|
||||
h = hashlib.new('ripemd160')
|
||||
except ValueError as e:
|
||||
raise RuntimeError(
|
||||
"Your Python/OpenSSL installation does not support RIPEMD160. "
|
||||
"Try reinstalling Python with full OpenSSL support."
|
||||
) from e
|
||||
h.update(x)
|
||||
return h.digest()
|
||||
|
||||
|
||||
|
||||
def double_sha256(x):
|
||||
""" SHA-256 of SHA-256, as used extensively in bitcoin. """
|
||||
return sha256(sha256(x))
|
||||
|
|
Loading…
Add table
Reference in a new issue