Skip to content

Commit

Permalink
Merge pull request #121 from skalenetwork/bug/SKALE-2835-delete-bls-key
Browse files Browse the repository at this point in the history
SKALE-2835 fix deleting bls keys
  • Loading branch information
olehnikolaiev authored Jul 10, 2020
2 parents 4342c5d + 98ecbbf commit 9a8dbc5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions SGXWalletServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,6 @@ Json::Value SGXWalletServer::isPolyExistsImpl(const string &_polyName) {

Json::Value SGXWalletServer::getServerStatusImpl() {
INIT_RESULT(result)

return result;
}

Expand All @@ -659,13 +658,13 @@ Json::Value SGXWalletServer::deleteBlsKeyImpl(const std::string& name) {
std::shared_ptr <std::string> 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;
}
Expand Down

0 comments on commit 9a8dbc5

Please sign in to comment.