summaryrefslogtreecommitdiff
path: root/src/or/networkstatus.c
diff options
context:
space:
mode:
authorMike Perry <mikeperry-git@torproject.org>2016-09-22 17:52:25 -0400
committerNick Mathewson <nickm@torproject.org>2017-05-08 13:49:23 -0400
commit687a85950afc25010c80cd14539728b3a7ae5675 (patch)
tree033a575f75d586272f1e332c2d3a3b0f7ec26da1 /src/or/networkstatus.c
parentae4d8c9c745b396049c3064b7dc764bbd9a58058 (diff)
downloadtor-687a85950afc25010c80cd14539728b3a7ae5675.tar.gz
tor-687a85950afc25010c80cd14539728b3a7ae5675.zip
Cache netflow-related consensus parameters.
Checking all of these parameter lists for every single connection every second seems like it could be an expensive waste. Updating globally cached versions when there is a new consensus will still allow us to apply consensus parameter updates to all existing connections immediately.
Diffstat (limited to 'src/or/networkstatus.c')
-rw-r--r--src/or/networkstatus.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c
index 76b968a8c8..4107542f56 100644
--- a/src/or/networkstatus.c
+++ b/src/or/networkstatus.c
@@ -63,6 +63,7 @@
#include "shared_random.h"
#include "transports.h"
#include "torcert.h"
+#include "channelpadding.h"
/** Map from lowercase nickname to identity digest of named server, if any. */
static strmap_t *named_server_map = NULL;
@@ -1966,6 +1967,7 @@ networkstatus_set_current_consensus(const char *consensus,
circuit_build_times_new_consensus_params(
get_circuit_build_times_mutable(), c);
+ channelpadding_new_consensus_params(c);
}
/* Reset the failure count only if this consensus is actually valid. */