remove external lib

This commit is contained in:
4tochka 2019-04-23 15:21:56 +04:00
parent d262f1b8a8
commit 5879462067
2 changed files with 2 additions and 1 deletions

View File

@ -228,7 +228,7 @@ static PyObject *secp256k1_secp256k1_ec_pubkey_create(PyObject *self, PyObject *
return NULL;
}
secp256k1_pubkey pubkey;
return Py_BuildValue("y#", '123456789', 9);
return Py_BuildValue("b", 0);
int r = 0;
r = secp256k1_ec_pubkey_create(secp256k1_precomp_context_sign, &pubkey, buffer.buf);
if (r != 1) {

View File

@ -125,6 +125,7 @@ def private_to_public_key(private_key, compressed=True, hex=True):
if len(private_key) != 32:
raise TypeError("private key length invalid")
pub = __secp256k1_ec_pubkey_create__(private_key, bool(compressed))
return pub
if not pub:
raise RuntimeError("secp256k1 error")
return pub.hex() if hex else pub