diff options
author | Nick Mathewson <nickm@torproject.org> | 2021-11-09 09:07:04 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2021-11-09 09:07:04 -0500 |
commit | 73639fc3c1696e3073f51875c71355e5bd0bf656 (patch) | |
tree | cd49ec26c09f08cd2c031fb90d86e699c50f17c3 /src/feature | |
parent | 08d452b38c84c6522b9ec4b0ebae29c5bba6c83d (diff) | |
download | tor-73639fc3c1696e3073f51875c71355e5bd0bf656.tar.gz tor-73639fc3c1696e3073f51875c71355e5bd0bf656.zip |
Change a log not to use published_on.
It used to describe when the old and new routerinfos were published
when we'd decide to download a routerinfo. Now it describes what
their descriptor digests are.
Diffstat (limited to 'src/feature')
-rw-r--r-- | src/feature/nodelist/routerlist.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/feature/nodelist/routerlist.c b/src/feature/nodelist/routerlist.c index 2d6ae13711..8bcc42bc3f 100644 --- a/src/feature/nodelist/routerlist.c +++ b/src/feature/nodelist/routerlist.c @@ -2719,17 +2719,20 @@ update_consensus_router_descriptor_downloads(time_t now, int is_vote, continue; /* We would never use it ourself. */ } if (is_vote && source) { - char time_bufnew[ISO_TIME_LEN+1]; - char time_bufold[ISO_TIME_LEN+1]; + char old_digest_buf[HEX_DIGEST_LEN+1]; + const char *old_digest = "none"; const routerinfo_t *oldrouter; oldrouter = router_get_by_id_digest(rs->identity_digest); - format_iso_time(time_bufnew, rs->published_on); - if (oldrouter) - format_iso_time(time_bufold, oldrouter->cache_info.published_on); + if (oldrouter) { + base16_encode(old_digest_buf, sizeof(old_digest_buf), + oldrouter->cache_info.signed_descriptor_digest, + DIGEST_LEN); + old_digest = old_digest_buf; + } log_info(LD_DIR, "Learned about %s (%s vs %s) from %s's vote (%s)", routerstatus_describe(rs), - time_bufnew, - oldrouter ? time_bufold : "none", + hex_str(rs->descriptor_digest, DIGEST_LEN), + old_digest, source->nickname, oldrouter ? "known" : "unknown"); } smartlist_add(downloadable, rs->descriptor_digest); |