Skip to content
Snippets Groups Projects
Commit 970715dd authored by Nick Mathewson's avatar Nick Mathewson :game_die:
Browse files

Fix a check for when to rebuild the microdesc cache. (Backport from 0.2.3.

parent 698fa0fc
No related branches found
No related tags found
No related merge requests found
o Minor bugfixes
- The microdesc journal is supposed to get rebuilt only if it is
at least _half_ the length of the store, not _twice_ the length
of the store. Bugfix on 0.2.2.6-alpha; fixes part of bug 2230.
......@@ -208,7 +208,7 @@ microdescs_add_list_to_cache(microdesc_cache_t *cache,
size_t old_content_len =
cache->cache_content ? cache->cache_content->size : 0;
if (cache->journal_len > 16384 + old_content_len &&
cache->journal_len > old_content_len * 2) {
cache->journal_len > old_content_len / 2) {
microdesc_cache_rebuild(cache);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment