aboutsummaryrefslogtreecommitdiff
path: root/src/feature/nodelist
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2022-11-09 15:10:19 -0500
committerDavid Goulet <dgoulet@torproject.org>2022-11-09 15:12:51 -0500
commit780ca741f3738877ad577f84fcebf6874427b2bc (patch)
treebf52100dace97bd089963f3e3f7b2e1ee82d4e17 /src/feature/nodelist
parente3f6908984c6f2e6361a1a15f37d6bb0647efda9 (diff)
downloadtor-780ca741f3738877ad577f84fcebf6874427b2bc.tar.gz
tor-780ca741f3738877ad577f84fcebf6874427b2bc.zip
relay: Cache onion queue parameters on consensus change
This is part of the fast path so we need to cache consensus parameters instead of querying it everytime we need to learn a value. Part of #40704 Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/feature/nodelist')
-rw-r--r--src/feature/nodelist/networkstatus.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/feature/nodelist/networkstatus.c b/src/feature/nodelist/networkstatus.c
index fa1e38dac0..af3bde83a5 100644
--- a/src/feature/nodelist/networkstatus.c
+++ b/src/feature/nodelist/networkstatus.c
@@ -84,6 +84,7 @@
#include "feature/nodelist/routerlist.h"
#include "feature/nodelist/torcert.h"
#include "feature/relay/dns.h"
+#include "feature/relay/onion_queue.h"
#include "feature/relay/routermode.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "lib/crypt_ops/crypto_util.h"
@@ -1670,6 +1671,7 @@ notify_before_networkstatus_changes(const networkstatus_t *old_c,
hs_dos_consensus_has_changed(new_c);
rep_hist_consensus_has_changed(new_c);
cpuworker_consensus_has_changed(new_c);
+ onion_consensus_has_changed(new_c);
}
/* Called after a new consensus has been put in the global state. It is safe