Browse Source

fixing problems with reputation testing

Stan Gurtler 2 years ago
parent
commit
da9bef24c1
1 changed files with 2 additions and 7 deletions
  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);