]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Move vote_schedule into its own header.
authorNick Mathewson <nickm@torproject.org>
Fri, 15 Jun 2018 16:50:07 +0000 (12:50 -0400)
committerNick Mathewson <nickm@torproject.org>
Fri, 15 Jun 2018 16:50:07 +0000 (12:50 -0400)
src/or/dirauth/dirvote.c
src/or/include.am
src/or/or.h
src/or/vote_timing_st.h [new file with mode: 0644]

index 3a2df5ee67ea106257718c988f0224a400109df6..ae2de57a84e6b3dedf2abaa470cde412592a89c9 100644 (file)
@@ -29,6 +29,7 @@
 #include "dirauth/shared_random_state.h"
 
 #include "dir_server_st.h"
+#include "vote_timing_st.h"
 
 /**
  * \file dirvote.c
index 353d52ea2b97faa31b4d1e5c2d2e58c43fd82c29..87a353828bbe03b7ab9f3d2d838167d2aec85237 100644 (file)
@@ -299,6 +299,7 @@ ORHEADERS = \
        src/or/torcert.h                                \
        src/or/tor_api_internal.h                       \
        src/or/tor_version_st.h                         \
+       src/or/vote_timing_st.h                         \
        src/or/voting_schedule.h
 
 # We add the headers of the modules even though they are disabled so we can
index d390c47bf0b22293709607bd44719e8ada005263..dd46bfd052d281b93ccb4eda3deecbd4b3eee73c 100644 (file)
@@ -3913,18 +3913,7 @@ typedef struct measured_bw_line_t {
 
 /********************************* dirvote.c ************************/
 
-/** Describes the schedule by which votes should be generated. */
-typedef struct vote_timing_t {
-  /** Length in seconds between one consensus becoming valid and the next
-   * becoming valid. */
-  int vote_interval;
-  /** For how many intervals is a consensus valid? */
-  int n_intervals_valid;
-  /** Time in seconds allowed to propagate votes */
-  int vote_delay;
-  /** Time in seconds allowed to propagate signatures */
-  int dist_delay;
-} vote_timing_t;
+typedef struct vote_timing_t vote_timing_t;
 
 /********************************* geoip.c **************************/
 
diff --git a/src/or/vote_timing_st.h b/src/or/vote_timing_st.h
new file mode 100644 (file)
index 0000000..3bf3619
--- /dev/null
@@ -0,0 +1,24 @@
+/* Copyright (c) 2001 Matej Pfajfar.
+ * Copyright (c) 2001-2004, Roger Dingledine.
+ * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
+ * Copyright (c) 2007-2017, The Tor Project, Inc. */
+/* See LICENSE for licensing information */
+
+#ifndef VOTE_TIMING_ST_H
+#define VOTE_TIMING_ST_H
+
+/** Describes the schedule by which votes should be generated. */
+struct vote_timing_t {
+  /** Length in seconds between one consensus becoming valid and the next
+   * becoming valid. */
+  int vote_interval;
+  /** For how many intervals is a consensus valid? */
+  int n_intervals_valid;
+  /** Time in seconds allowed to propagate votes */
+  int vote_delay;
+  /** Time in seconds allowed to propagate signatures */
+  int dist_delay;
+};
+
+#endif
+