Unverified Commit a4274711 authored by kladko's avatar kladko

SKALE-3228

parent 65368983
......@@ -155,16 +155,15 @@ std::vector<string> LevelDB::writeKeysToVector1(uint64_t _maxKeysToVisit){
}
void LevelDB::writeDataUnique(const string & name, const string &value) {
auto key = n ame;
auto key = name;
if (readString(Name) != nullptr) {
if (readString(name)) {
spdlog::debug("Name {} already exists", name);
throw SGXException(KEY_SHARE_ALREADY_EXISTS, "Data with this name already exists");
}
writeString(key, value);
}
......
......@@ -46,16 +46,25 @@
/*Initialize a curve*/
domain_parameters domain_parameters_init()
{
LOG_INFO("Allocating curver");
domain_parameters curve;
curve = calloc(sizeof(struct domain_parameters_s),1);
LOG_INFO("Initing members");
//Initialize all members
mpz_init(curve->p);
mpz_init(curve->a);
mpz_init(curve->b);
mpz_init(curve->n);
mpz_init(curve->h);
LOG_INFO("Initing point");
curve->G = point_init();
mpz_init(curve->n);
mpz_init(curve->h);
return curve;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment