ecc_fast: require libsecp256k1 on lightning, channel graph breaks electrum without

This commit is contained in:
Janus 2018-09-27 16:41:03 +02:00 committed by SomberNight
parent dd576df67e
commit b7e1748a17
No known key found for this signature in database
GPG key ID: B33B5F232C6271E9

View file

@ -184,10 +184,8 @@ def _prepare_monkey_patching_of_python_ecdsa_internals_with_libsecp256k1():
def do_monkey_patching_of_python_ecdsa_internals_with_libsecp256k1():
if not _libsecp256k1:
# FIXME print_error will always print as 'verbosity' is not yet initialised
print_error('[ecc] info: libsecp256k1 library not available, falling back to python-ecdsa. '
'This means signing operations will be slower.')
return
raise Exception('libsecp256k1 library not available. '
'Verifying Lightning channels is too computationally expensive without libsecp256k1, aborting.')
if not _patched_functions.prepared_to_patch:
raise Exception("can't patch python-ecdsa without preparations")
ecdsa.ecdsa.Private_key.sign = _patched_functions.fast_sign