diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-03-07 14:12:53 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-03-16 14:40:33 -0400 |
commit | 653c6d129efc93899ffb447d99ecee98dd7ab373 (patch) | |
tree | 82f9b8b850782aa4008ac9c08c63a766bd3ea1d6 /src/or/consdiff.h | |
parent | 6a36e5ff3b7233e430ce8b1ec567d3235ff04999 (diff) | |
download | tor-653c6d129efc93899ffb447d99ecee98dd7ab373.tar.gz tor-653c6d129efc93899ffb447d99ecee98dd7ab373.zip |
Make consensus diff sha3 operations mockable.
(We'll want this for fuzzing)
Diffstat (limited to 'src/or/consdiff.h')
-rw-r--r-- | src/or/consdiff.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/or/consdiff.h b/src/or/consdiff.h index eef3653f69..7797067f32 100644 --- a/src/or/consdiff.h +++ b/src/or/consdiff.h @@ -62,8 +62,13 @@ STATIC int smartlist_slice_string_pos(const smartlist_slice_t *slice, STATIC void set_changed(bitarray_t *changed1, bitarray_t *changed2, const smartlist_slice_t *slice1, const smartlist_slice_t *slice2); -STATIC int consensus_compute_digest(const char *cons, - consensus_digest_t *digest_out); + +MOCK_DECL(STATIC int, + consensus_compute_digest,(const char *cons, + consensus_digest_t *digest_out)); +MOCK_DECL(STATIC int, + consensus_digest_eq,(const uint8_t *d1, + const uint8_t *d2)); #endif #endif |