diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-08-09 13:45:03 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-08-09 13:45:03 -0400 |
commit | 3cddd6570c6c1e30b002893262680c3d3235d6c3 (patch) | |
tree | e17502b814b6b6fd4512b4c8424007d4799b8003 /src/or/or.h | |
parent | d655388a4a7c6a4415c8a48d410809591385c344 (diff) | |
download | tor-3cddd6570c6c1e30b002893262680c3d3235d6c3.tar.gz tor-3cddd6570c6c1e30b002893262680c3d3235d6c3.zip |
Add a hashtable mapping to nodes from ed25519 ids
Diffstat (limited to 'src/or/or.h')
-rw-r--r-- | src/or/or.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/or/or.h b/src/or/or.h index ff11c72790..9449e87e11 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -2443,6 +2443,8 @@ typedef struct node_t { /** Used to look up the node_t by its identity digest. */ HT_ENTRY(node_t) ht_ent; + /** Used to look up the node_t by its ed25519 identity digest. */ + HT_ENTRY(node_t) ed_ht_ent; /** Position of the node within the list of nodes */ int nodelist_idx; @@ -2450,6 +2452,13 @@ typedef struct node_t { * identity may exist at a time. */ char identity[DIGEST_LEN]; + /** The ed25519 identity of this node_t. This field is nonzero iff we + * currently have an ed25519 identity for this node in either md or ri, + * _and_ this node has been inserted to the ed25519-to-node map in the + * nodelist. + */ + ed25519_public_key_t ed25519_id; + microdesc_t *md; routerinfo_t *ri; routerstatus_t *rs; |