Commit b07c2279 authored by Sebastian Hahn's avatar Sebastian Hahn
Browse files

Voting: Run at most one fetch in parallel per auth

parent b411e105
Pipeline #2608 passed with stage
in 19 minutes and 16 seconds
......@@ -671,8 +671,8 @@ directory_choose_address_routerstatus(const routerstatus_t *status,
}
/** As directory_get_from_dirserver, but initiates a request to <i>every</i>
* directory authority other than ourself. Only for use by authorities when
* searching for missing information while voting. */
* directory authority other than ourself and itself. Only for use by
* authorities when searching for missing information while voting. */
void
directory_get_from_all_authorities(uint8_t dir_purpose,
uint8_t router_purpose,
......@@ -688,6 +688,18 @@ directory_get_from_all_authorities(uint8_t dir_purpose,
if (!(ds->type & V3_DIRINFO))
continue;
const routerstatus_t *rs = &ds->fake_status;
tor_addr_port_t unused, addr_port;
if (BUG(directory_choose_address_routerstatus(rs,
DIRIND_DIRECT_CONN, &unused, &addr_port) < 0))
return;
if (connection_get_by_type_addr_port_purpose(CONN_TYPE_DIR,
&addr_port.addr, addr_port.port, dir_purpose)) {
log_info(LD_DIR, "Not asking because already asked XXX");
continue;
}
directory_request_t *req = directory_request_new(dir_purpose);
directory_request_set_routerstatus(req, rs);
directory_request_set_router_purpose(req, router_purpose);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment