Skip to content
Snippets Groups Projects
Commit 962765a3 authored by Sebastian Hahn's avatar Sebastian Hahn Committed by Nick Mathewson
Browse files

Don't list relays w/ bw estimate of 0 in the consensus

This implements a feature from bug 13000. Instead of starting a bwauth
run with this wrong idea about their bw, relays should do the self-test
and then get measured.
parent 14abf1c3
No related branches found
No related tags found
No related merge requests found
......@@ -2,4 +2,6 @@
- If our previous bandwidth estimate was 0 bytes, allow publishing a
new relay descriptor immediately. Fixes bug 13000; bugfix on
0.1.1.6-alpha.
o Minor features:
- Don't list relays with a bandwidth estimate of 0 in the consensus.
Implements a feature proposed during discussion of bug 13000.
......@@ -1051,7 +1051,8 @@ format_versions_list(config_line_t *ln)
}
/** Return 1 if <b>ri</b>'s descriptor is "active" -- running, valid,
* not hibernating, and not too old. Else return 0.
* not hibernating, having observed bw greater 0, and not too old. Else
* return 0.
*/
static int
router_is_active(const routerinfo_t *ri, const node_t *node, time_t now)
......@@ -1061,6 +1062,8 @@ router_is_active(const routerinfo_t *ri, const node_t *node, time_t now)
return 0;
if (!node->is_running || !node->is_valid || ri->is_hibernating)
return 0;
if (!ri->bandwidthcapacity)
return 0;
return 1;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment