mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 06:13:31 +01:00
dir auths write consensuses to disk after creation
This step happens after we make each consensus flavor, and before we worry about sigs or anything. That way if Tor crashes, or if we fail to get enough sigs, we still have a chance to know what consensus we wanted to make.
This commit is contained in:
parent
0b00f79c82
commit
9e6064ec35
@ -3462,6 +3462,15 @@ dirvote_compute_consensuses(void)
|
||||
pending[flav].body = consensus_body;
|
||||
pending[flav].consensus = consensus;
|
||||
n_generated++;
|
||||
|
||||
/* Write it out to disk too, for dir auth debugging purposes */
|
||||
{
|
||||
char *filename;
|
||||
tor_asprintf(&filename, "my-consensus-%s", flavor_name);
|
||||
write_str_to_file(get_datadir_fname(filename), consensus_body, 0);
|
||||
tor_free(filename);
|
||||
}
|
||||
|
||||
consensus_body = NULL;
|
||||
consensus = NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user