Skip to content

Add fallback for ripemd160 when not available in hashlib#31

Open
Eunovo wants to merge 3 commits intodarosior:masterfrom
Eunovo:master
Open

Add fallback for ripemd160 when not available in hashlib#31
Eunovo wants to merge 3 commits intodarosior:masterfrom
Eunovo:master

Conversation

@Eunovo
Copy link
Copy Markdown
Contributor

@Eunovo Eunovo commented May 17, 2023

Resolves #30

@Eunovo
Copy link
Copy Markdown
Contributor Author

Eunovo commented May 17, 2023

@darosior I got this error while trying to run tests
ImportError while importing test module '.../python-bip380/tests/test_miniscript.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: /usr/lib/python3.10/importlib/__init__.py:126: in import_module return _bootstrap._gcd_import(name[level:], package, level) tests/test_miniscript.py:7: in <module> from bitcointx.core import ( ../../.local/lib/python3.10/site-packages/bitcointx/core/__init__.py:25: in <module> from . import script ../../.local/lib/python3.10/site-packages/bitcointx/core/script.py:31: in <module> import bitcointx.core.key ../../.local/lib/python3.10/site-packages/bitcointx/core/key.py:39: in <module> from bitcointx.core.secp256k1 import ( ../../.local/lib/python3.10/site-packages/bitcointx/core/secp256k1.py:250: in <module> _secp256k1 = load_secp256k1_library(bitcointx.util._secp256k1_library_path) ../../.local/lib/python3.10/site-packages/bitcointx/core/secp256k1.py:235: in load_secp256k1_library raise ImportError('secp256k1 library not found') E ImportError: secp256k1 library not found

Comment thread bip380/utils/hashes.py
"""

import hashlib
from ripemd_fallback import ripemd160_fallback
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this needs to be a relative path, i.e. .ripemd_fallback

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.

hash160 may not always work

2 participants