Переглянути джерело

Pass incoming consensus documents to the consdiffmgr code

Nick Mathewson 7 роки тому
батько
коміт
ab73bda060
1 змінених файлів з 4 додано та 0 видалено
  1. 4 0
      src/or/networkstatus.c

+ 4 - 0
src/or/networkstatus.c

@@ -46,6 +46,7 @@
 #include "config.h"
 #include "connection.h"
 #include "connection_or.h"
+#include "consdiffmgr.h"
 #include "control.h"
 #include "directory.h"
 #include "dirserv.h"
@@ -1981,6 +1982,9 @@ networkstatus_set_current_consensus(const char *consensus,
                                                flavor,
                                                &c->digests,
                                                c->valid_after);
+    if (server_mode(get_options())) {
+      consdiffmgr_add_consensus(consensus, c);
+    }
   }
 
   if (!from_cache) {