Skip to content

Conversation

@Brian496
Copy link

Summary

This PR adds a fallback handler in lbry/crypto/hash.py to gracefully handle environments where the 'ripemd160' hash is not supported by OpenSSL. The fallback prevents a startup crash and prints a helpful error message.

Additionally, a note has been added to the README.md to help users resolve the issue if it occurs, particularly in WSL or custom Python builds.

Changes

  • Wrapped hashlib.new('ripemd160') in a try/except block
  • Provided troubleshooting info in README.md

Reason

Without this fix, lbrynet crashes at startup with a cryptic ValueError: unsupported hash type ripemd160 in certain environments (e.g., WSL2 with some OpenSSL builds). This addresses that critical error while documenting a workaround.

Related


✅ Happy to iterate if improvements are suggested.

@ben221199
Copy link
Member

LTGM.

@ben221199 ben221199 merged commit cf4c65b into LBRYFoundation:master Jun 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants