Explorar o código

fixing problems with reputation testing

Stan Gurtler %!s(int64=2) %!d(string=hai) anos
pai
achega
da9bef24c1
Modificáronse 1 ficheiros con 2 adicións e 7 borrados
  1. 2 7
      prsona/src/networkClient.cpp

+ 2 - 7
prsona/src/networkClient.cpp

@@ -156,13 +156,8 @@ bool make_reputation_proof(
     // Load this current encrypted score into client object
     prsonaClient->receive_vote_tally(encryptedScoreProof, encryptedScore);
 
-    // Choose a random (valid) threshold to make a proof for
-    mpz_class maxScore = prsonaClient->get_score().toInt();
-    int maxScoreInt = 0;
-    while (maxScoreInt < maxScore)
-        maxScoreInt++;
-    std::uniform_int_distribution<int> scoreThresholdDistribution(0, maxScoreInt);
-    Scalar threshold(scoreThresholdDistribution(rng));
+    // Zero will always be a valid threshold
+    Scalar threshold(0);
 
     // Use client object to generate a correct reputation proof with the chosen parameters
     std::vector<Proof> repProof = prsonaClient->generate_reputation_proof(threshold, numClients);