Hopefully this is more thread-safe
This commit is contained in:
parent
d69e67c032
commit
10897adf1e
1 changed files with 6 additions and 5 deletions
|
|
@ -1,12 +1,13 @@
|
|||
namespace detail
|
||||
{
|
||||
static int init_secp256k1() {
|
||||
secp256k1_start(SECP256K1_START_VERIFY | SECP256K1_START_SIGN);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void init_lib() {
|
||||
static int init_s = 0;
|
||||
static int init_s = init_secp256k1();
|
||||
static int init_o = init_openssl();
|
||||
if (!init_s) {
|
||||
secp256k1_start(SECP256K1_START_VERIFY | SECP256K1_START_SIGN);
|
||||
init_s = 1;
|
||||
}
|
||||
}
|
||||
|
||||
void public_key_impl::free_key()
|
||||
|
|
|
|||
Loading…
Reference in a new issue