Skip to content

Commit

Permalink
Added a check for MCLBN_COMPILED_TIME_VAR value in mcl_init.h
Browse files Browse the repository at this point in the history
  • Loading branch information
mxaddict committed Feb 19, 2024
1 parent 36a365b commit a3070a3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/blsct/arith/mcl/mcl_init.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,13 @@ class MclInit
static bool is_initialized = false;
if (is_initialized) return;

if (blsInit(MCL_BLS12_381, MCLBN_COMPILED_TIME_VAR) != 0) {
#ifndef MCLBN_COMPILED_TIME_VAR
int compiledTimeVar = 0;
#else
int compiledTimeVar = MCLBN_COMPILED_TIME_VAR;
#endif

if (blsInit(MCL_BLS12_381, compiledTimeVar) != 0) {
throw std::runtime_error("blsInit failed");
}
mclBn_setETHserialization(1);
Expand Down

0 comments on commit a3070a3

Please sign in to comment.