diff options
Diffstat (limited to 'src/or/entrynodes.c')
-rw-r--r-- | src/or/entrynodes.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/or/entrynodes.c b/src/or/entrynodes.c index b3fa31df7b..434f2f6222 100644 --- a/src/or/entrynodes.c +++ b/src/or/entrynodes.c @@ -405,6 +405,15 @@ entry_guard_get_by_id_digest_for_guard_selection(guard_selection_t *gs, return NULL; } +/** Return the node_t associated with a single entry_guard_t. May + * return NULL if the guard is not currently in the consensus. */ +const node_t * +entry_guard_find_node(const entry_guard_t *guard) +{ + tor_assert(guard); + return node_get_by_id(guard->identity); +} + /** If <b>digest</b> matches the identity of any node in the * entry_guards list for the default guard selection state, return that node. Else return NULL. */ |