[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [torflow/master] Actually, we should be using min(circ_error, pid_error).



commit 3be33faf271d378fddc4a048538703cf16ffd586
Author: Mike Perry <mikeperry-git@xxxxxxxxxx>
Date:   Fri Dec 2 01:20:17 2011 -0800

    Actually, we should be using min(circ_error,pid_error).
---
 NetworkScanners/BwAuthority/README.spec.txt |    3 ++-
 NetworkScanners/BwAuthority/aggregate.py    |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/NetworkScanners/BwAuthority/README.spec.txt b/NetworkScanners/BwAuthority/README.spec.txt
index d223160..ddaa7cc 100644
--- a/NetworkScanners/BwAuthority/README.spec.txt
+++ b/NetworkScanners/BwAuthority/README.spec.txt
@@ -517,7 +517,8 @@
        respectively.
 
        If this error value is negative (meaning the node is failing
-       more circuits than the network average), we use it as the
+       more circuits than the network average), we use the smaller
+       of the circ_error and the original pid_error as the new
        pid_error.
 
     "bwauthbestratio=0"
diff --git a/NetworkScanners/BwAuthority/aggregate.py b/NetworkScanners/BwAuthority/aggregate.py
index ae6f5be..884b065 100755
--- a/NetworkScanners/BwAuthority/aggregate.py
+++ b/NetworkScanners/BwAuthority/aggregate.py
@@ -549,7 +549,7 @@ def main(argv):
         # FIXME: Hrmm, should we only penalize for circ fails, or should
         # we reward, too?
         if circ_error < 0:
-          n.pid_error = circ_error
+          n.pid_error = min(circ_error,n.pid_error)
 
       if n.idhex in prev_votes.vote_map:
         # If there is a new sample, let's use it for all but guards

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits