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

[tor-commits] [tor/master] Write guardfraction information to votes.



commit 7ddfb6aa2f3779da8bacd0574f152f558a5a508e
Author: George Kadianakis <desnacked@xxxxxxxxxx>
Date:   Thu Jan 29 14:55:35 2015 +0000

    Write guardfraction information to votes.
    
    If a dirauth has guardfraction information about a guard, write it down
    when serializing the routerstatus.
---
 src/or/dirserv.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index 0d3e782..10b9e63 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -1922,6 +1922,13 @@ routerstatus_format_entry(const routerstatus_t *rs, const char *version,
       smartlist_add_asprintf(chunks,
                        " Measured=%d", vrs->measured_bw_kb);
     }
+    /* Write down guardfraction information if we have it. */
+    if (format == NS_V3_VOTE && vrs && vrs->status.has_guardfraction) {
+      smartlist_add_asprintf(chunks,
+                             " GuardFraction=%d",
+                             vrs->status.guardfraction_percentage);
+    }
+
     smartlist_add(chunks, tor_strdup("\n"));
 
     if (desc) {



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