summaryrefslogtreecommitdiff
path: root/src/or/or.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-05-03 10:17:37 -0400
committerNick Mathewson <nickm@torproject.org>2017-05-04 08:37:41 -0400
commit112286338b61ed747572cfa67ac38e2052e7c807 (patch)
tree55fa2684d9ab3201011cb65da950687cf1db9974 /src/or/or.h
parent0418357ffd575ff4a3ec95937f596776c3b9ecec (diff)
downloadtor-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/or.h')
-rw-r--r--src/or/or.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/or/or.h b/src/or/or.h
index e30a1d24c8..b69fcf110b 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -1938,6 +1938,7 @@ typedef struct cached_dir_t {
size_t dir_z_len; /**< Length of <b>dir_z</b>. */
time_t published; /**< When was this object published. */
common_digests_t digests; /**< Digests of this object (networkstatus only) */
+ uint8_t digest_sha3_full[DIGEST256_LEN]; /**< sha3 digest (also ns only) */
int refcnt; /**< Reference count for this cached_dir_t. */
} cached_dir_t;
@@ -2638,6 +2639,9 @@ typedef struct networkstatus_t {
/** Digests of this document, as signed. */
common_digests_t digests;
+ /** A SHA3-256 digest of the document, including signatures: used for
+ * consensus diffs */
+ uint8_t digest_full_sha3[DIGEST256_LEN];
/** List of router statuses, sorted by identity digest. For a vote,
* the elements are vote_routerstatus_t; for a consensus, the elements