summaryrefslogtreecommitdiff
path: root/src/or/shared_random_state.c
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2016-05-10 11:37:28 -0400
committerDavid Goulet <dgoulet@torproject.org>2016-07-01 14:01:41 -0400
commit8ac88f6f9739c5fd5fd5b47af63592faa80b8307 (patch)
tree0bd2da4e51557dda7a5a263f1b0f9e1c7f5efa4c /src/or/shared_random_state.c
parent056b6186adeb5ee92d0899f60b5e061bfc11a8ba (diff)
downloadtor-8ac88f6f9739c5fd5fd5b47af63592faa80b8307.tar.gz
tor-8ac88f6f9739c5fd5fd5b47af63592faa80b8307.zip
prop250: Add a valid flag to sr_commit_t
We assert on it using the ASSERT_COMMIT_VALID() macro in critical places where we use them expecting a commit to be valid. Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/shared_random_state.c')
-rw-r--r--src/or/shared_random_state.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/or/shared_random_state.c b/src/or/shared_random_state.c
index 326b8c9cf0..115d95410b 100644
--- a/src/or/shared_random_state.c
+++ b/src/or/shared_random_state.c
@@ -410,6 +410,9 @@ disk_state_parse_commits(sr_state_t *state,
* fingerprint that we don't know about so it shouldn't be used. */
continue;
}
+ /* We consider parseable commit from our disk state to be valid because
+ * they need to be in the first place to get in there. */
+ commit->valid = 1;
/* Add commit to our state pointer. */
commit_add_to_state(commit, state);