From 98ecbbf3c44dea72fd0df32170704c2cd7eb94f2 Mon Sep 17 00:00:00 2001 From: Oleh Nikolaiev Date: Fri, 10 Jul 2020 15:54:12 +0300 Subject: [PATCH] SKALE-2835 fix deleting bls keys --- SGXWalletServer.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/SGXWalletServer.cpp b/SGXWalletServer.cpp index 0a9d34fe..60d815b8 100644 --- a/SGXWalletServer.cpp +++ b/SGXWalletServer.cpp @@ -637,7 +637,6 @@ Json::Value SGXWalletServer::isPolyExistsImpl(const string &_polyName) { Json::Value SGXWalletServer::getServerStatusImpl() { INIT_RESULT(result) - return result; } @@ -659,13 +658,13 @@ Json::Value SGXWalletServer::deleteBlsKeyImpl(const std::string& name) { std::shared_ptr bls_ptr = LevelDB::getLevelDb()->readString(key); if (bls_ptr != nullptr) { + LevelDB::getLevelDb()->deleteKey(name); result["deleted"] = true; return result; } else { std::string error_msg = "BLS key with such name not found: " + name; throw SGXException(INVALID_BLS_NAME, error_msg.c_str()); } - LevelDB::getLevelDb()->deleteKey(name); } HANDLE_SGX_EXCEPTION(result) return result; }