SKALE-2835 fix build

parent 633956d2
...@@ -113,17 +113,6 @@ void LevelDB::deleteKey(const string &_key) { ...@@ -113,17 +113,6 @@ void LevelDB::deleteKey(const string &_key) {
spdlog::debug("key deleted: {}",_key ); spdlog::debug("key deleted: {}",_key );
} }
void LevelDB::deleteDkgPoly( const std::string& name ) {
std::lock_guard<std::recursive_mutex> lock(mutex);
auto status = db->Delete(writeOptions, Slice(name));
throwExceptionOnError(status);
spdlog::debug("key deleted: {}", name);
}
void LevelDB::writeByteArray(const char *_key, size_t _keyLen, const char *value, void LevelDB::writeByteArray(const char *_key, size_t _keyLen, const char *value,
size_t _valueLen) { size_t _valueLen) {
......
...@@ -87,8 +87,6 @@ public: ...@@ -87,8 +87,6 @@ public:
void deleteKey(const string &_key); void deleteKey(const string &_key);
void deleteDkgPoly( const std::string& name );
public: public:
......
...@@ -569,7 +569,7 @@ SGXWalletServer::createBLSPrivateKeyImpl(const string &_blsKeyName, const string ...@@ -569,7 +569,7 @@ SGXWalletServer::createBLSPrivateKeyImpl(const string &_blsKeyName, const string
LevelDB::getLevelDb()->deleteDHDKGKey(name); LevelDB::getLevelDb()->deleteDHDKGKey(name);
string shareG2_name = "shareG2_" + _polyName + "_" + to_string(i) + ":"; string shareG2_name = "shareG2_" + _polyName + "_" + to_string(i) + ":";
LevelDB::getLevelDb()->deleteKey(shareG2_name); LevelDB::getLevelDb()->deleteKey(shareG2_name);
LevelDB::getLevelDb()->deleteDkgPoly(_polyName`); LevelDB::getLevelDb()->deleteKey(_polyName);
} }
} HANDLE_SGX_EXCEPTION(result) } HANDLE_SGX_EXCEPTION(result)
...@@ -666,10 +666,10 @@ Json::Value SGXWalletServer::deleteBlsKeyImpl(const std::string& name) { ...@@ -666,10 +666,10 @@ Json::Value SGXWalletServer::deleteBlsKeyImpl(const std::string& name) {
result["deleted"] = false; result["deleted"] = false;
try { try {
if (!checkName(_blsKeyName, "BLS_KEY")) { if (!checkName(name, "BLS_KEY")) {
throw SGXException(INVALID_BLS_NAME, "Invalid BLSKey name"); throw SGXException(INVALID_BLS_NAME, "Invalid BLSKey name");
} }
LevelDB::getLevelDb()->deleteBlsKey(name); LevelDB::getLevelDb()->deleteKey(name);
} HANDLE_SGX_EXCEPTION(result) } HANDLE_SGX_EXCEPTION(result)
return result; return result;
} }
...@@ -777,9 +777,9 @@ Json::Value SGXWalletServer::getServerVersion() { ...@@ -777,9 +777,9 @@ Json::Value SGXWalletServer::getServerVersion() {
return getServerVersionImpl(); return getServerVersionImpl();
} }
Json::Value SGXWalletServer::deleteBlsKey() { Json::Value SGXWalletServer::deleteBlsKey(const std::string& name) {
READ_LOCK(m) READ_LOCK(m)
return deleteBlsKeyImpl(); return deleteBlsKeyImpl(name);
} }
shared_ptr <string> SGXWalletServer::readFromDb(const string &name, const string &prefix) { shared_ptr <string> SGXWalletServer::readFromDb(const string &name, const string &prefix) {
......
...@@ -141,7 +141,7 @@ class AbstractStubServer : public jsonrpc::AbstractServer<AbstractStubServer> ...@@ -141,7 +141,7 @@ class AbstractStubServer : public jsonrpc::AbstractServer<AbstractStubServer>
response = this->getServerVersion(); response = this->getServerVersion();
} }
inline virtual deleteBlsKeyI(const Json::Value& request, Json::Value& response) { inline virtual void deleteBlsKeyI(const Json::Value& request, Json::Value& response) {
response = this->deleteBlsKey(request["blsKeyName"].asString()); response = this->deleteBlsKey(request["blsKeyName"].asString());
} }
...@@ -166,7 +166,6 @@ class AbstractStubServer : public jsonrpc::AbstractServer<AbstractStubServer> ...@@ -166,7 +166,6 @@ class AbstractStubServer : public jsonrpc::AbstractServer<AbstractStubServer>
virtual Json::Value getServerStatus() = 0; virtual Json::Value getServerStatus() = 0;
virtual Json::Value getServerVersion() = 0; virtual Json::Value getServerVersion() = 0;
virtual Json::Value deleteBlsKey(const std::string& name) = 0; virtual Json::Value deleteBlsKey(const std::string& name) = 0;
virtual Json::Value deleteBlsKey(const std::string& name) = 0;
}; };
#endif //JSONRPC_CPP_STUB_ABSTRACTSTUBSERVER_H_ #endif //JSONRPC_CPP_STUB_ABSTRACTSTUBSERVER_H_
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