diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-05-03 10:17:37 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-05-04 08:37:41 -0400 |
commit | 112286338b61ed747572cfa67ac38e2052e7c807 (patch) | |
tree | 55fa2684d9ab3201011cb65da950687cf1db9974 /src/or/dirserv.c | |
parent | 0418357ffd575ff4a3ec95937f596776c3b9ecec (diff) | |
download | tor-112286338b61ed747572cfa67ac38e2052e7c807.tar.gz tor-112286338b61ed747572cfa67ac38e2052e7c807.zip |
Store the sha3 of a networkstatus as part of the networkstatus_t
Also store it in the cached_dir_t.
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r-- | src/or/dirserv.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c index bdf40b6611..af7ec978e0 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -1212,6 +1212,8 @@ void dirserv_set_cached_consensus_networkstatus(const char *networkstatus, const char *flavor_name, const common_digests_t *digests, + // XXXX rename after 22143 + const uint8_t *sha3_full_digest, time_t published) { cached_dir_t *new_networkstatus; @@ -1221,6 +1223,8 @@ dirserv_set_cached_consensus_networkstatus(const char *networkstatus, new_networkstatus = new_cached_dir(tor_strdup(networkstatus), published); memcpy(&new_networkstatus->digests, digests, sizeof(common_digests_t)); + memcpy(&new_networkstatus->digest_sha3_full, sha3_full_digest, + DIGEST256_LEN); old_networkstatus = strmap_set(cached_consensuses, flavor_name, new_networkstatus); if (old_networkstatus) |