diff options
author | Nick Mathewson <nickm@torproject.org> | 2020-01-16 12:14:12 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2020-01-16 12:14:12 -0500 |
commit | 60a0d7d1e89df47a12c806585ef41e0b98c5d675 (patch) | |
tree | df4bcb672f34569dfe779cb7dcd8f9c2e0ef25a0 | |
parent | 594e5ce635481a2aca60bbb31b656e3970ad511b (diff) | |
download | tor-60a0d7d1e89df47a12c806585ef41e0b98c5d675.tar.gz tor-60a0d7d1e89df47a12c806585ef41e0b98c5d675.zip |
expose routerstatus_has_changed to unit tests.
-rw-r--r-- | src/feature/nodelist/networkstatus.c | 3 | ||||
-rw-r--r-- | src/feature/nodelist/networkstatus.h | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/feature/nodelist/networkstatus.c b/src/feature/nodelist/networkstatus.c index df035ef1b3..208efcef66 100644 --- a/src/feature/nodelist/networkstatus.c +++ b/src/feature/nodelist/networkstatus.c @@ -1611,8 +1611,7 @@ networkstatus_consensus_has_ipv6(const or_options_t* options) * and the printing function routerstatus_format_entry in * NS_CONTROL_PORT mode. **/ - -static int +STATIC int routerstatus_has_changed(const routerstatus_t *a, const routerstatus_t *b) { tor_assert(tor_memeq(a->identity_digest, b->identity_digest, DIGEST_LEN)); diff --git a/src/feature/nodelist/networkstatus.h b/src/feature/nodelist/networkstatus.h index b8430088c9..7b63e30e9c 100644 --- a/src/feature/nodelist/networkstatus.h +++ b/src/feature/nodelist/networkstatus.h @@ -164,6 +164,8 @@ STATIC void warn_early_consensus(const networkstatus_t *c, const char *flavor, extern networkstatus_t *current_ns_consensus; extern networkstatus_t *current_md_consensus; #endif /* defined(TOR_UNIT_TESTS) */ +STATIC int routerstatus_has_changed(const routerstatus_t *a, + const routerstatus_t *b); #endif /* defined(NETWORKSTATUS_PRIVATE) */ #endif /* !defined(TOR_NETWORKSTATUS_H) */ |