mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Write guardfraction information to votes.
If a dirauth has guardfraction information about a guard, write it down when serializing the routerstatus.
This commit is contained in:
committed by
Nick Mathewson
parent
5ee48d47a7
commit
7ddfb6aa2f
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user