SKALE-3951 add req methods

parent c2e1e4f1
...@@ -96,7 +96,7 @@ Json::Value getSecretShareReqMessage::process() { ...@@ -96,7 +96,7 @@ Json::Value getSecretShareReqMessage::process() {
auto polyName = getStringRapid("polyName"); auto polyName = getStringRapid("polyName");
auto t = getUint64Rapid("t"); auto t = getUint64Rapid("t");
auto n = getUint64Rapid("n"); auto n = getUint64Rapid("n");
auto pubKeys = getJsonArray("publicKeys"); auto pubKeys = getJsonValueRapid("publicKeys");
auto result = SGXWalletServer::getSecretShareImpl(polyName, pubKeys, t, n); auto result = SGXWalletServer::getSecretShareImpl(polyName, pubKeys, t, n);
result["type"] = ZMQMessage::GET_SECRET_SHARE_RSP; result["type"] = ZMQMessage::GET_SECRET_SHARE_RSP;
return result; return result;
...@@ -136,7 +136,7 @@ Json::Value getBLSPublicReqMessage::process() { ...@@ -136,7 +136,7 @@ Json::Value getBLSPublicReqMessage::process() {
Json::Value getAllBLSPublicKeysReqMessage::process() { Json::Value getAllBLSPublicKeysReqMessage::process() {
auto t = getUint64Rapid("t"); auto t = getUint64Rapid("t");
auto n = getUint64Rapid("n"); auto n = getUint64Rapid("n");
auto pubShares = getJsonArray("publicShares"); auto pubShares = getJsonValueRapid("publicShares");
auto result = SGXWalletServer::calculateAllBLSPublicKeysImpl(pubShares, t, n); auto result = SGXWalletServer::calculateAllBLSPublicKeysImpl(pubShares, t, n);
result["type"] = ZMQMessage::GET_ALL_BLS_PUBLIC_RSP; result["type"] = ZMQMessage::GET_ALL_BLS_PUBLIC_RSP;
return result; return result;
......
...@@ -43,7 +43,7 @@ uint64_t ZMQMessage::getUint64Rapid(const char *_name) { ...@@ -43,7 +43,7 @@ uint64_t ZMQMessage::getUint64Rapid(const char *_name) {
return a.GetUint64(); return a.GetUint64();
}; };
Json::Value ZMQMessage::getJsonArray(const char *_name) { Json::Value ZMQMessage::getJsonValueRapid(const char *_name) {
CHECK_STATE(_name); CHECK_STATE(_name);
CHECK_STATE(d->HasMember(_name)); CHECK_STATE(d->HasMember(_name));
const rapidjson::Value &a = (*d)[_name]; const rapidjson::Value &a = (*d)[_name];
......
...@@ -110,7 +110,7 @@ public: ...@@ -110,7 +110,7 @@ public:
uint64_t getUint64Rapid(const char *_name); uint64_t getUint64Rapid(const char *_name);
Json::Value getJsonArray(const char *_name); Json::Value getJsonValueRapid(const char *_name);
uint64_t getStatus() { uint64_t getStatus() {
return getUint64Rapid("status"); return getUint64Rapid("status");
......
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