SKALE-2794 fix codacy issues

parent ade77718
...@@ -156,8 +156,8 @@ vector<vector<string>> get_verif_vect(const char *encryptedPolyHex, int t, int n ...@@ -156,8 +156,8 @@ vector<vector<string>> get_verif_vect(const char *encryptedPolyHex, int t, int n
string trustedGetSecretShares(const string &_polyName, const char *_encryptedPolyHex, const vector<string> &_publicKeys, string trustedGetSecretShares(const string &_polyName, const char *_encryptedPolyHex, const vector<string> &_publicKeys,
int _t, int _t,
int _n) { int _n) {
vector<char> hexEncrKey(2 * BUF_LEN, 0);
vector<char> errMsg1(BUF_LEN, 0); vector<char> errMsg1(BUF_LEN, 0);
vector<char> hexEncrKey(BUF_LEN, 0);
int errStatus = 0; int errStatus = 0;
uint64_t encLen = 0; uint64_t encLen = 0;
......
...@@ -219,7 +219,7 @@ SGXWalletServer::blsSignMessageHashImpl(const string &_keyShareName, const strin ...@@ -219,7 +219,7 @@ SGXWalletServer::blsSignMessageHashImpl(const string &_keyShareName, const strin
} }
value = readFromDb(_keyShareName); value = readFromDb(_keyShareName);
} catch (SGXException _e) { } catch (SGXException& _e) {
result["status"] = _e.status; result["status"] = _e.status;
result["errorMessage"] = _e.errString; result["errorMessage"] = _e.errString;
return result; return result;
...@@ -786,7 +786,7 @@ void SGXWalletServer::writeDataToDB(const string &Name, const string &value) { ...@@ -786,7 +786,7 @@ void SGXWalletServer::writeDataToDB(const string &Name, const string &value) {
Json::FastWriter writer; Json::FastWriter writer;
val["value"] = value; val["value"] = value;
string json = writer.write(val); writer.write(val);
auto key = Name; auto key = Name;
......
...@@ -256,7 +256,7 @@ void TestUtils::sendRPCRequest() { ...@@ -256,7 +256,7 @@ void TestUtils::sendRPCRequest() {
sigShareSet.addSigShare(make_shared<BLSSigShare>(sig)); sigShareSet.addSigShare(make_shared<BLSSigShare>(sig));
} }
shared_ptr <BLSSignature> commonSig = sigShareSet.merge(); sigShareSet.merge();
} }
void TestUtils::destroyEnclave() { void TestUtils::destroyEnclave() {
......
...@@ -72,7 +72,7 @@ template<class T> string ConvertToString(const T& field_elem, int base = 10) { ...@@ -72,7 +72,7 @@ template<class T> string ConvertToString(const T& field_elem, int base = 10) {
return output; return output;
} }
string ConvertG2ToString(const libff::alt_bn128_G2 & elem, int base = 10, string delim = ":") { string ConvertG2ToString(const libff::alt_bn128_G2 & elem, int base = 10, const string& delim = ":") {
string result; string result;
result += ConvertToString(elem.X.c0); result += ConvertToString(elem.X.c0);
result += delim; result += delim;
......
...@@ -62,4 +62,4 @@ testList = [ "[cert-sign]", ...@@ -62,4 +62,4 @@ testList = [ "[cert-sign]",
for t in testList: for t in testList:
print("Starting " + t) print("Starting " + t)
assert subprocess.call(["./testw", t]) == 0 assert subprocess.call(["./testw", t]) == 0
print("Ending " + t) print("Ending " + t)
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