[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] dirvote: Move voting_schedule_t to dirvote.c



commit 5e1e906a5c479ba9294d345b0221c99725d45d8c
Author: David Goulet <dgoulet@xxxxxxxxxxxxxx>
Date:   Thu Apr 5 11:27:39 2018 -0400

    dirvote: Move voting_schedule_t to dirvote.c
    
    Signed-off-by: David Goulet <dgoulet@xxxxxxxxxxxxxx>
---
 src/or/dirvote.c | 34 ++++++++++++++++++++++++++++++++++
 src/or/dirvote.h | 36 ------------------------------------
 2 files changed, 34 insertions(+), 36 deletions(-)

diff --git a/src/or/dirvote.c b/src/or/dirvote.c
index 9f4893c37..67ab1d4ff 100644
--- a/src/or/dirvote.c
+++ b/src/or/dirvote.c
@@ -72,6 +72,40 @@ typedef struct pending_consensus_t {
   networkstatus_t *consensus;
 } pending_consensus_t;
 
+/** Scheduling information for a voting interval. */
+typedef struct {
+  /** When do we generate and distribute our vote for this interval? */
+  time_t voting_starts;
+  /** When do we send an HTTP request for any votes that we haven't
+   * been posted yet?*/
+  time_t fetch_missing_votes;
+  /** When do we give up on getting more votes and generate a consensus? */
+  time_t voting_ends;
+  /** When do we send an HTTP request for any signatures we're expecting to
+   * see on the consensus? */
+  time_t fetch_missing_signatures;
+  /** When do we publish the consensus? */
+  time_t interval_starts;
+
+  /* True iff we have generated and distributed our vote. */
+  int have_voted;
+  /* True iff we've requested missing votes. */
+  int have_fetched_missing_votes;
+  /* True iff we have built a consensus and sent the signatures around. */
+  int have_built_consensus;
+  /* True iff we've fetched missing signatures. */
+  int have_fetched_missing_signatures;
+  /* True iff we have published our consensus. */
+  int have_published_consensus;
+
+  /* True iff this voting schedule was set on demand meaning not through the
+   * normal vote operation of a dirauth or when a consensus is set. This only
+   * applies to a directory authority that needs to recalculate the voting
+   * timings only for the first vote even though this object was initilized
+   * prior to voting. */
+  int created_on_demand;
+} voting_schedule_t;
+
 /* DOCDOC dirvote_add_signatures_to_all_pending_consensuses */
 static int dirvote_add_signatures_to_all_pending_consensuses(
                        const char *detached_signatures_body,
diff --git a/src/or/dirvote.h b/src/or/dirvote.h
index dd388fd96..88d0d56ff 100644
--- a/src/or/dirvote.h
+++ b/src/or/dirvote.h
@@ -96,42 +96,6 @@ void ns_detached_signatures_free_(ns_detached_signatures_t *s);
 /* cert manipulation */
 authority_cert_t *authority_cert_dup(authority_cert_t *cert);
 
-/* vote scheduling */
-
-/** Scheduling information for a voting interval. */
-typedef struct {
-  /** When do we generate and distribute our vote for this interval? */
-  time_t voting_starts;
-  /** When do we send an HTTP request for any votes that we haven't
-   * been posted yet?*/
-  time_t fetch_missing_votes;
-  /** When do we give up on getting more votes and generate a consensus? */
-  time_t voting_ends;
-  /** When do we send an HTTP request for any signatures we're expecting to
-   * see on the consensus? */
-  time_t fetch_missing_signatures;
-  /** When do we publish the consensus? */
-  time_t interval_starts;
-
-  /* True iff we have generated and distributed our vote. */
-  int have_voted;
-  /* True iff we've requested missing votes. */
-  int have_fetched_missing_votes;
-  /* True iff we have built a consensus and sent the signatures around. */
-  int have_built_consensus;
-  /* True iff we've fetched missing signatures. */
-  int have_fetched_missing_signatures;
-  /* True iff we have published our consensus. */
-  int have_published_consensus;
-
-  /* True iff this voting schedule was set on demand meaning not through the
-   * normal vote operation of a dirauth or when a consensus is set. This only
-   * applies to a directory authority that needs to recalculate the voting
-   * timings only for the first vote even though this object was initilized
-   * prior to voting. */
-  int created_on_demand;
-} voting_schedule_t;
-
 void dirvote_get_preferred_voting_intervals(vote_timing_t *timing_out);
 time_t dirvote_get_start_of_next_interval(time_t now,
                                           int interval,



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits