diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-06-15 12:50:07 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-06-15 12:50:07 -0400 |
commit | f8794b0b36ad400a228fa3cfd96d7a250632dd29 (patch) | |
tree | 1990af25a442c8d368cbcbb9258b313ec3300e27 /src | |
parent | 5cdc2343302f8fec9d71a6f1e7ec28befb7379cf (diff) | |
download | tor-f8794b0b36ad400a228fa3cfd96d7a250632dd29.tar.gz tor-f8794b0b36ad400a228fa3cfd96d7a250632dd29.zip |
Move vote_schedule into its own header.
Diffstat (limited to 'src')
-rw-r--r-- | src/or/dirauth/dirvote.c | 1 | ||||
-rw-r--r-- | src/or/include.am | 1 | ||||
-rw-r--r-- | src/or/or.h | 13 | ||||
-rw-r--r-- | src/or/vote_timing_st.h | 24 |
4 files changed, 27 insertions, 12 deletions
diff --git a/src/or/dirauth/dirvote.c b/src/or/dirauth/dirvote.c index 3a2df5ee67..ae2de57a84 100644 --- a/src/or/dirauth/dirvote.c +++ b/src/or/dirauth/dirvote.c @@ -29,6 +29,7 @@ #include "dirauth/shared_random_state.h" #include "dir_server_st.h" +#include "vote_timing_st.h" /** * \file dirvote.c diff --git a/src/or/include.am b/src/or/include.am index 353d52ea2b..87a353828b 100644 --- a/src/or/include.am +++ b/src/or/include.am @@ -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 diff --git a/src/or/or.h b/src/or/or.h index d390c47bf0..dd46bfd052 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -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 index 0000000000..3bf3619071 --- /dev/null +++ b/src/or/vote_timing_st.h @@ -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 + |