diff options
author | Roger Dingledine <arma@torproject.org> | 2021-01-16 16:23:31 -0500 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2021-01-21 13:46:56 -0500 |
commit | 9e6064ec359a170ab37fb5d66ef7c46519ac1caa (patch) | |
tree | c81fb45cf2e0df979f8fa6d07e78e126bdaf67b4 | |
parent | 0b00f79c82894c0bd0ff2d492420f7d9e6101d9e (diff) | |
download | tor-9e6064ec359a170ab37fb5d66ef7c46519ac1caa.tar.gz tor-9e6064ec359a170ab37fb5d66ef7c46519ac1caa.zip |
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.
-rw-r--r-- | src/feature/dirauth/dirvote.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/feature/dirauth/dirvote.c b/src/feature/dirauth/dirvote.c index 6824af815f..cf1135ba37 100644 --- a/src/feature/dirauth/dirvote.c +++ b/src/feature/dirauth/dirvote.c @@ -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; } |