Update ecc.py

This commit is contained in:
kodxana 2020-02-19 15:17:06 +01:00 committed by GitHub
parent 72c79597fa
commit 227a74c327
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -116,7 +116,7 @@ def sig_string_from_r_and_s(r: int, s: int) -> bytes:
def _x_and_y_from_pubkey_bytes(pubkey: bytes) -> Tuple[int, int]: def _x_and_y_from_pubkey_bytes(pubkey: bytes) -> Tuple[int, int]:
pubkey_ptr = create_string_buffer(64) pubkey_ptr = create_string_buffer(64)
assert isinstance(pubkey, bytes), f'pubkey must be bytes, not {type(pubkey)}' assert isinstance(pubkey, bytes), f'pubkey must be bytes, not {type(pubkey)}'
ret = _libsecp256k1.secp256k1_ec_pubkey_parse( ret = _libsecp256k1.secp256k1_ec_pubkey_parse(
_libsecp256k1.ctx, pubkey_ptr, pubkey, len(pubkey)) _libsecp256k1.ctx, pubkey_ptr, pubkey, len(pubkey))
if not ret: if not ret: