Unverified Commit c1b72a17 authored by svetaro's avatar svetaro

SKALE-1955 Add getServerStatus to SGXWalletServer

parent a1e1185e
...@@ -653,6 +653,14 @@ Json::Value MultG2Impl(const std::string& x){ ...@@ -653,6 +653,14 @@ Json::Value MultG2Impl(const std::string& x){
return result; return result;
} }
Json::Value getServerStatusImpl() {
Json::Value result;
result["status"] = 0;
result["errorMessage"] = "";
return result;
}
Json::Value SGXWalletServer::generateDKGPoly(const std::string& polyName, int t){ Json::Value SGXWalletServer::generateDKGPoly(const std::string& polyName, int t){
std::cerr << "entered generateDKGPoly" << std::endl; std::cerr << "entered generateDKGPoly" << std::endl;
...@@ -735,10 +743,14 @@ Json::Value SGXWalletServer::ComplaintResponse(const std::string& polyName, int ...@@ -735,10 +743,14 @@ Json::Value SGXWalletServer::ComplaintResponse(const std::string& polyName, int
} }
Json::Value SGXWalletServer::MultG2(const std::string& x){ Json::Value SGXWalletServer::MultG2(const std::string& x){
lock_guard<recursive_mutex> lock(m); lock_guard<recursive_mutex> lock(m);
return MultG2Impl(x); return MultG2Impl(x);
} }
Json::Value SGXWalletServer::getServerStatus() {
lock_guard<recursive_mutex> lock(m);
return getServerStatusImpl();
}
shared_ptr<string> readFromDb(const string & name, const string & prefix) { shared_ptr<string> readFromDb(const string & name, const string & prefix) {
......
...@@ -60,6 +60,7 @@ public: ...@@ -60,6 +60,7 @@ public:
virtual Json::Value GetBLSPublicKeyShare(const std::string & BLSKeyName); virtual Json::Value GetBLSPublicKeyShare(const std::string & BLSKeyName);
virtual Json::Value ComplaintResponse(const std::string& polyName, int ind); virtual Json::Value ComplaintResponse(const std::string& polyName, int ind);
virtual Json::Value MultG2(const std::string & x); virtual Json::Value MultG2(const std::string & x);
virtual Json::Value getServerStatus();
}; };
...@@ -86,5 +87,6 @@ Json::Value CreateBLSPrivateKeyImpl(const std::string & BLSKeyName, const std::s ...@@ -86,5 +87,6 @@ Json::Value CreateBLSPrivateKeyImpl(const std::string & BLSKeyName, const std::s
Json::Value GetBLSPublicKeyShareImpl(const std::string & BLSKeyName); Json::Value GetBLSPublicKeyShareImpl(const std::string & BLSKeyName);
Json::Value ComplaintResponseImpl(const std::string& polyName, int ind); Json::Value ComplaintResponseImpl(const std::string& polyName, int ind);
Json::Value MultG2Impl(const std::string & x); Json::Value MultG2Impl(const std::string & x);
Json::Value getServerStatusImpl();
#endif //SGXWALLET_SGXWALLETSERVER_HPP #endif //SGXWALLET_SGXWALLETSERVER_HPP
\ No newline at end of file
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