diff options
Diffstat (limited to 'src/or/nodelist.c')
-rw-r--r-- | src/or/nodelist.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/or/nodelist.c b/src/or/nodelist.c index 4d67904c81..2c78c35ab5 100644 --- a/src/or/nodelist.c +++ b/src/or/nodelist.c @@ -69,6 +69,7 @@ #include "dirauth/mode.h" #include "dir_server_st.h" +#include "node_st.h" static void nodelist_drop_node(node_t *node, int remove_from_ht); #define node_free(val) \ @@ -634,6 +635,14 @@ nodelist_set_consensus(networkstatus_t *ns) } } +/** Return 1 iff <b>node</b> has Exit flag and no BadExit flag. + * Otherwise, return 0. + */ +int node_is_good_exit(const node_t *node) +{ + return node->is_exit && ! node->is_bad_exit; +} + /** Helper: return true iff a node has a usable amount of information*/ static inline int node_is_usable(const node_t *node) |