gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet] 160/164: Fixed some stuff


From: gnunet
Subject: [gnunet] 160/164: Fixed some stuff
Date: Fri, 30 Jul 2021 15:33:46 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository gnunet.

commit c152b740df657b4a32b8d3178d3e9b077b750016
Author: Elias Summermatter <elias.summermatter@seccom.ch>
AuthorDate: Thu Jun 17 09:31:26 2021 +0200

    Fixed some stuff
---
 src/setu/gnunet-service-setu.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/setu/gnunet-service-setu.c b/src/setu/gnunet-service-setu.c
index ee0b0b620..508434057 100644
--- a/src/setu/gnunet-service-setu.c
+++ b/src/setu/gnunet-service-setu.c
@@ -92,7 +92,7 @@
  * Security level used for byzantine checks (2^80)
  */
 
-#define SECURITY_LEVEL (long long unsigned) 1 << 30
+#define SECURITY_LEVEL 80
 
 /**
  * Is the estimated probabily for a new round this values
@@ -1644,7 +1644,7 @@ full_sync_plausibility_check (struct Operation *op)
   if(GNUNET_YES != op->byzantine)
       return;
 
-  long double security_level_lb = (long double) 1 / (SECURITY_LEVEL);
+  int security_level_lb = -1 * SECURITY_LEVEL;
   uint64_t duplicates = op->received_fresh - op->received_total;
 
   /*
@@ -1707,8 +1707,7 @@ full_sync_plausibility_check (struct Operation *op)
 static void
 check_max_differential_rounds (struct Operation *op)
 {
-  long double probability = powl (PROBABILITY_FOR_NEW_ROUND,
-                                  op->differential_sync_iterations);
+  long double probability = op->differential_sync_iterations * 
(log2l(PROBABILITY_FOR_NEW_ROUND)/log2l(2));
   if ((long double) 1 / (SECURITY_LEVEL) > probability)
   {
     LOG (GNUNET_ERROR_TYPE_ERROR,

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]